-
Notifications
You must be signed in to change notification settings - Fork 32
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
JP-3463: Fix poisson variance calculation #255
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
==========================================
- Coverage 85.18% 84.99% -0.19%
==========================================
Files 35 35
Lines 6797 6865 +68
==========================================
+ Hits 5790 5835 +45
- Misses 1007 1030 +23 ☔ View full report in Codecov by Sentry. |
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.
Will you add a CI test to test_ramp_fitting.py
for non-zero average dark current?
I just added one; I haven't done much with pytest before though so let me know if you think it needs to be tweaked. |
It looks fine. Just something to test what the expected values should be, so it will fail if any changes are made to the way the dark current is used the test will fail. I'll approve this PR 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.
Just a minor comment on the change log entry. Will start a regression test run using this PR branch.
Started regtest run at https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1404/ |
Regression test results show what I'm guessing are expected differences in the SCI, ERR, and VAR_POISSON arrays in rate/rateints files, which then propagate to later products. So I think this looks OK. |
This PR addresses the issue in JP-3463 where the addition of an average dark current to the poisson variance calculation step results in incorrect SCI array values for NIRSpec. This PR adjusts the method of dealing with negative slopes and all-zero variance special cases. Tested against two sets of MIRI data and one set of NIRSpec, and is working as intended both with and without specifying the new parameter.
Resolves JP-3463
Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)