-
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
Jump performance #337
Jump performance #337
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #337 +/- ##
==========================================
+ Coverage 85.94% 86.14% +0.20%
==========================================
Files 50 50
Lines 9401 9313 -88
==========================================
- Hits 8080 8023 -57
+ Misses 1321 1290 -31 ☔ 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.
I'll review in more detail soon, but I have a couple initial comments below, then I can kick off regression tests.
Adding a quick note that I've done some initial testing on this too, with good results. In the case of MIRI TSO observation jw03730013001_03101_00001-seg001_mirimage_uncal.fits the results are identical and jump step runtime goes down from 358 to 156 seconds. |
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 great! I'd like an answer from someone on the one flagging logic question, though, and I have a few more questions below.
jwst regtests: https://github.com/spacetelescope/RegressionTests/actions/runs/13165362881 Romancal tests pass. JWST tests show expected differences only, matching main. |
I think this should be good to go now. I will re-run the jwst tests one more time for the last small change, then merge. |
Resolves JP-3697
Closes #337
A number of changes to
twopoint_difference.py
andjump.py
reduce memory usage by a factor of about 2 and improve runtime by a factor of anywhere from 3 to 20. Tested output files (noted below) are unchanged, except for MIRI shower detection injw01701012001_02105_00001_mirifulong
. This is due to a difference in replacing infilled saturated pixels after performing a convolution; the new version identifies fewer showers. An example comment on this is here:https://jira.stsci.edu/browse/JP-3697?focusedId=760740&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-760740
Overflagging of jumps should no longer cause the pipeline to grind to a halt due to
np.where
combined withfor
loops over pixels; it should now have virtually no impact on performance.Files tested, along with memory usage and runtimes in the jump step (all files are public except for program 5263):
A significant fraction of the line changes are due to fixing a mixture of 8-space indents and 4-space indents in
twopoint_difference.py
. Most of these lines were not actually changed.Tasks
docs/
pageno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)"git+https://github.com/<fork>/stcal@<branch>"
)jwst
regression testromancal
regression testnews fragment change types...
changes/<PR#>.apichange.rst
: change to public APIchanges/<PR#>.bugfix.rst
: fixes an issuechanges/<PR#>.general.rst
: infrastructure or miscellaneous change