-
Notifications
You must be signed in to change notification settings - Fork 174
JP-3738: Subtract pedestal dark for MIRI MRS when constructing selfcal minimum #8771
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
Conversation
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.
Looks great, it should do what is expected. Just one style nitpick.
Regression tests need to be run too. I will start those when Jenkins is free
if (input_sci.meta.instrument.detector.upper() == 'MIRIFUSHORT'): | ||
selfcal_3d.append(selfcal_model.data - np.nanmedian(selfcal_model.data[50:1024-50, 503:516])) | ||
elif (input_sci.meta.instrument.detector.upper() == 'MIRIFULONG'): | ||
selfcal_3d.append(selfcal_model.data - np.nanmedian(selfcal_model.data[50:1024-50, 474:507])) | ||
else: | ||
selfcal_3d.append(selfcal_model.data) |
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.
Style nit-pick incoming: Oftentimes in the pipeline when we want to hard-code numbers like this, we create an all-caps variable at the top of the file (just below imports) like this example. I think it would be good to do this with the pedestal indices, e.g. PEDESTAL_IDX_LONG=(50,974,474,507)
and then call that variable where needed.
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.
Done!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8771 +/- ##
=======================================
Coverage 60.79% 60.79%
=======================================
Files 373 373
Lines 38690 38696 +6
=======================================
+ Hits 23523 23527 +4
- Misses 15167 15169 +2 ☔ View full report in Codecov by Sentry. |
Regression test failures appear to match the ones from last night's nightly run, except that the two |
One more thing, and sorry, I probably should have been less trigger-happy with the "approve" button. It would probably be good to add a bullet point to the Description section of the badpix selfcal docs saying that the pedestal average is subtracted from each frame for MIRI data. |
Good call, added. |
Some small difference in the flagged pixels sounds reasonable and should be ok. |
everything looks good to me now |
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.
LGTM! Thanks for reviewing, Ned, and for the fix, David!
This PR addresses JP-3738 by subtracting off the MRS median pedestal dark when performing bad pixel self calibration combine of multiple input exposures.
Tasks
Build 11.3
(use the latest build if not sure)CHANGES.rst
within the relevant release section (otherwise add theno-changelog-entry-needed
label to this PR)docs/
pageokify_regtests
to update the truth files