-
Notifications
You must be signed in to change notification settings - Fork 171
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
AL-479: Preparing ramp fit code for removal from JWST and moved to STCAL #6010
AL-479: Preparing ramp fit code for removal from JWST and moved to STCAL #6010
Conversation
…o the step code tests.
…than data models. Changed the standard ramp fit tests to match this input.
… simple numpy arrays. Removed reference to jwst.reffile_utils from ramp fit processing code and moved it to ramp fit step code.
…ple of arrays. All tests and regression tests have passed.
…to the fitting of each integration.
…l references to datamodels can now be removed. All tests, including regression tests, pass.
Codecov Report
@@ Coverage Diff @@
## master #6010 +/- ##
==========================================
- Coverage 77.91% 77.58% -0.33%
==========================================
Files 404 404
Lines 35418 37227 +1809
==========================================
+ Hits 27595 28882 +1287
- Misses 7823 8345 +522
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Looks good so far. Yes, I see that, as you wrote in the description, you have modified 'almost' all of the JWST code (that will be moved to STCAL-ols_fit.py, ramp_fit.py, utils.py ) involving data models to instead use tuples. Some of the functions within these modules that call other functions within these modules still use JWST data models - which I think is what you meant by 'almost'. These data models will also be replaced by tuples, right ?
The |
@dmggh @kmacdonald-stsci Does this need more work or is it ready for final review? |
This is ready for final review. |
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.
Aside from the datamodels code you have noted, it looks like the ramp_fit code is ready to be moved from JWST to STCAL.
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.
Looks good. Just some minor comments below. 👍
@pytest.fixture(scope="module") | ||
def generate_miri_reffiles(tmpdir_factory): | ||
gainfile = str(tmpdir_factory.mktemp("data").join("gain.fits")) | ||
readnoisefile = str(tmpdir_factory.mktemp("data").join('readnoise.fits')) | ||
|
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.
Is there a reason to have tmpdir_factory
here and have it scoped to module? This fixture doesn't write anything out. The mock reffiles are just returned in memory.
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.
The noise models are getting written to the temp directory. Only the file names are being returned, not the reference to the models in memory.
… file names through fixture.
This looks good. Ready to merge. Thanks! |
…ed to STCAL (spacetelescope#6010)" This reverts commit 5a9aaf8.
…ed to STCAL (spacetelescope#6010)" This reverts commit 5a9aaf8.
Closes #
Resolves JP-
Description
This PR addresses preparing JWST ramp fit to be moved to STCAL. JWST dependencies have been almost entirely eliminated. In particular, data models are no longer returned from
ramp_fit
. Tuples of arrays that can easily be used to create data models in step code are now used. The only JWST dependencies that still exist are DQ flags. I have structured the code so that this dependency can easily be removed. The only other dependency that will need to change are path dependencies. I have included path dependency changes in this code as comments.GLS and multiprocessing code have been commented out as not needed for the moment.
With these changes, all ramp fitting unit tests pass, as well as all regression tests, except for a known failure related to
jwst/regtest/test_nirspec_verify.py::test_verify_detector1[rate]
. A small number of pixels fail, but they are the same failures that currently fail inmaster
.Checklist