-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adjust saturation threshold depending on the read pattern #836
Conversation
for more information, see https://pre-commit.ci
…ancal into saturation-dilution
Codecov ReportPatch has no changes to coverable lines.
📢 Thoughts on this report? Let us know!. |
Regression tests are failing for unrelated reasons (presumably the forthcoming release?), though more broadly I think we expect the change to the saturation algorithm to introduce some differences in the saturation flagging. |
I think this is good to go, though I doubt we actually want to merge it until the corresponding stcal PR is merged. |
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, but of course the real work is in stcal.
Resolves RCAL-618
This PR in concert with spacetelescope/stcal#188 updates the saturation threshold to depend on the read pattern.
The idea is that the saturation reference file gives the number of counts at which a given pixel saturates. Roman downlinks resultants, which are usually averages of many reads. The current saturation flagging checks if a resultant is above the saturation threshold, but we want to know if any read in the resultant is above the threshold. The resultants in a sense dilute the saturated signal---a saturated last read is averaged with unsaturated earlier reads, bringing the resultant value beneath the saturation threshold. This PR corrects for that affect by passing stcal an additional argument, read_pattern, that specifies how reads are allocated to resultants, and using that information to adjust the saturation threshold resultant-by-resultant.
Checklist
CHANGES.rst
under the corresponding subsection