-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRC TA plot enhancements #794
Conversation
@Skyhawk172 since you have been using this function you may want to try the new minor additions. |
|
||
im_sim_scaled_aligned = im_sim_shifted*scalefactor | ||
|
||
# Plot | ||
if show_centroid: | ||
# First, see if we can retrieve the on-board TA centroid measurment from the OSS engineering DB in MAST | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test it out, I installed misc_jwst
but it crashed because I apparently haven't set up my MAST_API_TOKEN
environment variable. There's a built-in exception handler in engdb.get_ictm_event_log
that terminates the execution. So, until I set the env. variable, I'm now stuck and can't run the code because it will always go with misc_jwst
since it's installed. I think in such cases, the code should naturally revert to calculating the centroid using webbpsf methods, instead of halting altogether.
I think it'd be nice to be able to compare the two ways to measure the centroids; could the code calculate and report both centroids and (1) use the OSS if misc_jwst
is successful or (2) use the WebbPSF centroid otherwise?
ok, I can rework/improve the exception handling here. Yes, the intent of this part of the code is to compare the two ways to measure the centroids. It tries to get the OSS centroid, and the webbpsf centroid, and display and print both of them. As of Friday, in code not yet added to this PR, it also uses the WCS to retrieve where the star is "supposed to be" after the FGS acq, so it can also quantify directly what the pointing accuracy is after the FGS acq. |
OK @Skyhawk172, please update to the latest misc_jwst (as of a minute ago), and retry. I think it should allow access to the eng db without requiring the API token to be set now. |
Hmmm, I'm getting a different error now:
|
Oh, that parameter is just right now expecting startdate to be like "2024-01-14" with nothing after that. Can fix that too to be more general. |
Hello @mperrin, Thank you for updating !
Comment last updated at 2024-04-02 16:31:23 UTC |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #794 +/- ##
===========================================
- Coverage 59.91% 59.39% -0.52%
===========================================
Files 16 16
Lines 6865 6925 +60
===========================================
Hits 4113 4113
- Misses 2752 2812 +60 ☔ View full report in Codecov by Sentry. |
@obi-wan76 @obi-wan76 Wanted to ping you about this and ask if either of you will be able to review this PR, and if so by when? |
…WFS. Add more careful bad pix handling using DQ mask.
… OSS on-board measurement
…o show WCS, OSS, and webbpsf centroids. And PEP8 cleanup.
7205088
to
749e37f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I'm working on rebasing and deconflicting now 👍 |
@obi-wan76 eh, looks like some other change broke things: that error shows up for the code in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor enhancements to the
nrc_ta_image_comparison
function.show_centroid
parameter, which toggles a plot annotation showing the centroid location of the TA image. This includes a centroid measured using the fwcentroid code in poppy+webbpsf, and (optionally but automatically, if mymisc_jwst
toolkit is available, the onboard OSS centroids retrieved from the MAST engineering database).Probably fairly specialized use cases, but since I have this code now for myself it seems worthwhile to include it here to share.
Example with centroid over plotting:
Example showing a NIRCam coron target acq: