-
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
Removed redundant calculations, unneeded array allocations from jump step #302
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
===========================================
+ Coverage 29.57% 86.89% +57.31%
===========================================
Files 36 49 +13
Lines 7949 8949 +1000
===========================================
+ Hits 2351 7776 +5425
+ Misses 5598 1173 -4425 ☔ 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.
There are some down stream test failures. Are those related to this PR? If not, this looks fine.
The romancal tests for these changes pass, |
JWST regtests are running here: Failures are unrelated (from spacetelescope/jwst#8893). |
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.
These changes look pretty straightforward, and seem worth merging as is, before we do any more profiling or refactoring for jump.
One quick question about the change to the flag handling, below. Also, the change note needs to be moved out of the CHANGES.rst file to a newer style towncrier note -- see the PR template description for the new method. That should fix the readthedocs error and the changelog check.
@t-brandt - just checking in. I think this PR just needs some minor updates and it should be ready to go. Do you want to make the changes, or would you like me to do it for you? |
@melanieclarke Sorry for dropping the ball on this for a while. If you have the time and bandwidth to make the minor changes, please go ahead. Otherwise I'll try to do so over the weekend or next week. |
ac1069b
to
9f590c4
Compare
Rerunning jwst regtests here: and romancal here: |
Romancal tests look fine. There are some failures in jwst unit and regression tests that are related to some ongoing gwcs work. I will let that settle and rerun before we merge this. |
I actually want to make a few more changes--I can squeeze a significant amount of additional speedup while shortening the code. I will push those changes tonight or tomorrow. We can work on merging this after 11.2 :-) |
Sounds good, thanks. Can you please mark this draft for now, and let us know when you're ready? |
@melanieclarke: I updated the PR with new changes. The new changes are more significant so I think a bit more testing/more eyeballs are warranted, which presumably will wait until after 11.2 is done. I checked that the generated gdq arrays were identical for a few test files. Memory improvements are modest, speed improvements are large, and crashes/virtual memory/very slow performance when overflagging jumps should all be gone. |
Resolves JP-3697
Closes #
This PR affects the two-point-difference jump step only. It removes duplicate and redundant calculations and unneeded array allocations, which make a significant difference for large uncal files. Masked array median is also changed to nanmedian, and a few variables are renamed to avoid overwriting a quantity that is needed at the end of the routine.
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