-
Notifications
You must be signed in to change notification settings - Fork 167
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
Move common resample code to stcal #8695
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 #8695 +/- ##
==========================================
- Coverage 61.92% 55.47% -6.46%
==========================================
Files 376 377 +1
Lines 38685 38962 +277
==========================================
- Hits 23957 21615 -2342
- Misses 14728 17347 +2619 ☔ View full report in Codecov by Sentry. |
5c972de
to
eb38ce1
Compare
jwst/resample/resample.py
Outdated
|
||
|
||
class OutputTooLargeError(RuntimeError): | ||
"""Raised when the output is too large for in-memory instantiation""" | ||
|
||
|
||
class ResampleJWSTModelIO(ResampleModelIO): |
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.
Methods in resample.py
are used in the OutlierDetectionStep
, as well as the ResampleSpecStep
. Those need to be integrated into this PR
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.
Methods in
resample.py
are used in theOutlierDetectionStep
, as well as theResampleSpecStep
. Those need to be integrated into this PR
Yes, but this will be much easier to do after your PR that switches the pipeline to using ModelLibrary
is merged.
a738bb6
to
3baaf32
Compare
Thanks for sharing this. I started to look at the changes but haven't made it all the way through yet. I started 2 branches off of yours: |
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.
a couple minor comments. Seems to isolate the any dependencies on data models and the like which is very good.
|
||
#################################################### | ||
# Code below was left for spectral data for now # | ||
#################################################### | ||
|
||
class ResampleData: |
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.
Since this now is only used for spectral data, to make it clear, rename the class to ResampleSpectrum
and all uses of it in the spectral data.
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 would suggest we don't make this change as we may need to deprecate this class first.
9d5d6ff
to
32e4594
Compare
I will take care of pre-commit tests in a day. |
32e4594
to
0c18d77
Compare
0c18d77
to
2da81ea
Compare
2da81ea
to
f6677e8
Compare
This PR add the common resample code used by both JWST and Roman pipelines to stcal. Also, for the first time, this PR adopts the new
drizzle
API from spacetelescope/drizzle#134 for the resample code used in the pipelines. For now only imaging mode was switched to the new codeThis work is related to https://jira.stsci.edu/browse/AL-835
The code in this PR requires the code from spacetelescope/stcal#279 and spacetelescope/drizzle#134 be installed.
At this moment this is a very rough draft for illustration purpose. It should run with default arguments (except input_models and output file name can be specified; everything else is not guaranteed to work). There are no unit/regression tests and documentation may not match the code. Also, for now I kept the old
ResampleData
code to allow resampling of spectral data to work with the old code.Example:
Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR