-
Notifications
You must be signed in to change notification settings - Fork 174
JP-3830: MRS residual cosmic ray shower straylight correction #9126
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
edited
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9126 +/- ##
==========================================
- Coverage 73.77% 73.77% -0.01%
==========================================
Files 372 372
Lines 37265 37272 +7
==========================================
+ Hits 27492 27497 +5
- Misses 9773 9775 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I started regression tests here: It would be nice to have a unit test or two to cover the new code. Do you have bandwidth to give that a try? Edit: regtest results look fine. There are a few unrelated errors, but no changes as a result of this PR, as expected. I'll run again when code changes are done. |
Good call; I've added in a simple test. |
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.
Thank you for the unit test, and all the documentation updates! I have a few software suggestions below.
Co-authored-by: Melanie Clarke <mclarke@stsci.edu>
Co-authored-by: Melanie Clarke <mclarke@stsci.edu>
Co-authored-by: Melanie Clarke <mclarke@stsci.edu>
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.
Thanks for the quick responses! I have a couple more cleanup requests, and I'll rerun regtests, but I think this looks great. I tested the correction with default parameters on some MRS regression test data, and the results are a significant improvement!
Tagging @jemorrison for a second pair of eyes, if you have a little time to review. |
Co-authored-by: Melanie Clarke <mclarke@stsci.edu>
Co-authored-by: Melanie Clarke <mclarke@stsci.edu>
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 good to me. One tiny comment on doc.
The clean_showers module is surprising simple considering what it is trying to remove.
I was surprised at the large number for shower_x_stddev (18.0). Just for my understanding why is this set so large? The bad pixels have been naned out and the 3rd plane of the regions file is use to mark pixels that receive light from the sky and as I understand the shower_low and high reject are also used to further screen pixels.
Conceptually, it's large to enable the routine to reach across the masked-out IFU slices that can be 30+ pixels wide. Anecdotally, I tried a few different sizes and x=18 y=5 looked like it gave the best results visually for my test cases. It's entirely possible that there may be some better set of parameters though. |
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.
Everything looks good. Thanks for the contribution!
Resolves JP-3830 by adding an additional optional step to the MIRI MRS straylight correction code to measure and remove residual cosmic ray showers using information from the inter-slice pixels.
Tasks
Build 11.3
(use the latest build if not sure)no-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)docs/
pageokify_regtests
to update the truth files