-
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-3697: Jump Step Refactor #330
JP-3697: Jump Step Refactor #330
Conversation
…de management easier. Adding initial creation of JumpData class. Adding default values to class instantiation. Updating tests to work with the new interface. Updating all tests. Still need to clean up code and add docstrings. Removing unneeded paramter. Removing unneeded parameters. Refactoring code to use the JumpData class. Adding parameters to JumpData. Updating jump CI tests to match the refactoring using the JumpData. Updating find_faint_extended function to use the RampData class. Updating jump tests to conform with refactor. Removing unneeded comments. Refactored the multiprocessing and two point difference. Regactored the multiprocessing. Refactored out dqflags parameter and the multiprocessing function. Updating the TwoPointParams class to remove the dqflags parameter. Refactoring median calculations of first differences. Expanding comments and identifying areas for refactor. Refactoring find_faint_extended. Refactoring find_faing_extended. Refactoring find_crs. Adding print information for a JumpData instance. Prepping for rebase.
…the jump step parameters because it is not used.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
===========================================
+ Coverage 29.57% 84.54% +54.96%
===========================================
Files 36 49 +13
Lines 7949 9321 +1372
===========================================
+ Hits 2351 7880 +5529
+ Misses 5598 1441 -4157 ☔ View full report in Codecov by Sentry. |
I need to update |
Resolves JP-3697
Closes #
This PR refactors STCAL focusing on readability, memory consumption, and limiting scope of variables. This refactor reduced jump step memory reduction. The resident size of memory is reduced by more than 2GB, with the memory consumption spike due to
numpy.nanmedian
completely eliminated, and the heap size reduced by 1GB.The interface has been simplified with classes. Large functions have been logically broken into smaller functions for readability and scope limiting. Code duplications have been eliminated. Dead code and duplicated variable definitions have been eliminated.
The
twopoint_difference.py
still needs to be refactored.All CI tests pass.
All CI tests in the corresponding JWST PR pass, as do all '-k jump' regression tests.
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