-
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
Switch exposure pipeline to use ModelLibrary instead of a list of models #1525
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1525 +/- ##
==========================================
+ Coverage 76.81% 77.55% +0.73%
==========================================
Files 118 118
Lines 7743 7721 -22
==========================================
+ Hits 5948 5988 +40
+ Misses 1795 1733 -62 ☔ View full report in Codecov by Sentry. |
Thanks. This looks good. You also deleted some orphaned fully saturated exposure handling here. I think following your investigation we probably do want to keep and start using that code again, rather than deleting it? @ddavis-stsci , this refactors some of the pipeline handling to use ModelLibrary more uniformly, so you may want to weigh in here. |
Converted to draft to attempt to also address #1523 and some other elp cleanup. |
Besides the all saturated case not working it seems fine. |
d6dce4e
to
7d10663
Compare
Thanks for giving this a look. Unfortunately it was draft at the time and not yet finished. The major changes that occurred after your comment were:
I re-requested your review in light of these changes. |
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.
This looks good to me. I left some comments about the tweakreg / all saturated interaction.
Ultimately I think this case is rare enough and weird enough that probably we should be suspect of the whole exposure if any individual SCA is fully saturated, so I don't think it's a big deal. However, it surprised me a little to skip tweakreg for the whole array because of a single detector.
0bfd385
to
bd4f977
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.
Thanks Brett, approving!
Thanks! I rebased and started a new regtest run here: |
The PR makes a few updates to the exposure pipeline. The major feature is to use a
ModelLibrary
instead of a list of models. This allows:This PR also fixes a bug uncovered while working on this PR (#1523) where an all saturated input resulted in:
Regtests: https://github.com/spacetelescope/RegressionTests/actions/runs/11861738024
show 2 expected failures.
The first:
is a byproduct of using ModelLibrary. The output files for elp now contain asn information and have tweakreg correctly marked as 'SKIPPED' for test_pipeline_suffix.
The second failure is due to this PR fixing #1523.
test_all_saturated_against_truth
fails since this PR restores the old behavior where an all saturated input produces a cal files with all zeros and all subsequent steps skipped. As described in #1523 several updates to the elp resulted in this behavior being lost andcreate_fully_saturated_zeroed_image
(which was added in #541) being unused. With this PRcreate_fully_saturated_zeroed_image
is once again used. To hopefully avoid a future regression I added some additional tests for the "all saturated" input file that:ImageModel
Finally I added a few unit tests that run the elp with all steps skipped and no reference files. These are relatively fast (good candidates for unit tests) and check that when provided an input model the pipeline returns a model etc (and not a list as it does on main).
Closes #1523
Tasks
24Q4_B15
(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 filesnews fragment change types...
changes/<PR#>.general.rst
: infrastructure or miscellaneous changechanges/<PR#>.docs.rst
changes/<PR#>.stpipe.rst
changes/<PR#>.associations.rst
changes/<PR#>.scripts.rst
changes/<PR#>.mosaic_pipeline.rst
changes/<PR#>.patch_match.rst
steps
changes/<PR#>.dq_init.rst
changes/<PR#>.saturation.rst
changes/<PR#>.refpix.rst
changes/<PR#>.linearity.rst
changes/<PR#>.dark_current.rst
changes/<PR#>.jump_detection.rst
changes/<PR#>.ramp_fitting.rst
changes/<PR#>.assign_wcs.rst
changes/<PR#>.flatfield.rst
changes/<PR#>.photom.rst
changes/<PR#>.flux.rst
changes/<PR#>.source_detection.rst
changes/<PR#>.tweakreg.rst
changes/<PR#>.skymatch.rst
changes/<PR#>.outlier_detection.rst
changes/<PR#>.resample.rst
changes/<PR#>.source_catalog.rst