-
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
Speed up NRS IFU footprint computation #5969
Conversation
jwst/assign_wcs/nirspec.py
Outdated
slit_name : int or str | ||
Slit.name of an open slit. | ||
wavelength_range: list | ||
Wavelength range for the combination of fliter and grating. |
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.
typo: fliter -> filter
(1874.8184744639657, 1929.9072657798927))} | ||
|
||
hdul = create_nirspec_ifu_file("F290LP", "G140M") | ||
im = datamodels.ImageModel(hdul) |
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.
Should this be an IFUImageModel
or does it not matter to the usage here?
Codecov Report
@@ Coverage Diff @@
## master #5969 +/- ##
==========================================
- Coverage 77.81% 77.78% -0.04%
==========================================
Files 404 404
Lines 35352 35464 +112
==========================================
+ Hits 27509 27584 +75
- Misses 7843 7880 +37
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report at Codecov.
|
jwst/assign_wcs/util.py
Outdated
------- | ||
footprint : ndarray | ||
The spatial footprint | ||
spctral_region : tuple |
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.
should be spectral_region (not spectral_region)
jwst/assign_wcs/util.py
Outdated
footprint : ndarray | ||
The spatial footprint | ||
spctral_region : tuple | ||
The wavwlength range for the observation. |
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.
typo - should be wavelength
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.
Except for a few typos it looks fine to me.
Can we merge this so I can use it in cube_build. |
Description
This PR speeds up the computation of NIRSpec IFU footprints by using the WCS transforms directly,
instead of through the WCS object. Most of the transforms are reused and only slice specific differences are
computed.
The computed spectral range is saved in
meta.wcsinfo.spectral_range
. It's not saved in the FITS file.This is necessary for improving cube_build performance.
The "true" bounding box in the test was computed using the previous implementation with evaluating the WCS object.
Checklist