-
Notifications
You must be signed in to change notification settings - Fork 174
JP-2331 Cube build footprint #6478
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-2331 Cube build footprint #6478
Conversation
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.
Minor comment on the comment, but otherwise lgtm. Results as expected and fix the problem.
jwst/cube_build/ifu_cube.py
Outdated
@@ -1227,6 +1227,17 @@ def setup_ifucube_wcs(self): | |||
world = False | |||
if self.coord_system == 'skyalign': | |||
world = True | |||
# Do not use the spatial or spectral region found wcs if |
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.
Suggest:
Do not use the default spatial or spectral region found in the wcs if
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.
done
Codecov Report
@@ Coverage Diff @@
## master #6478 +/- ##
==========================================
- Coverage 78.33% 77.81% -0.53%
==========================================
Files 409 409
Lines 34840 35093 +253
==========================================
+ Hits 27291 27306 +15
- Misses 7549 7787 +238
*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.
lgtm
Not sure why the hidden file is removed in this PR.
I restarted the tests to clear the Py 3.10 job.
Closes #6456
Resolves JP-2331
Description
This PR concerns a bug fix for MIRI MRS IFU cubes.
This PR fixes a bug in calculating the IFU footprint for cubes not created by calspec2 pipeline. In the calspec2 pipeline a single IFU cube is created for each exposure. This IFU cube will contain both channels on the detector. In this case (output_type = multi) and the spatial and spectral footprint on the sky are determined in assign_wcs and are the footprints for both channels. Assign_wcs stores the spatial footprint in input_model.meta.wcsinfo.s_region and the spectral footprint in input_model.meta.wcsinfo.spectral_region. Because the MIRI channels are designed to be roughly concentric the s_region in wcsinfo is correct for the larger FOV (channel 2 and channel 4). When creating IFU cubes that contain one band (or one channel) and for channel with the smaller FOV on the detector (channel 1 or channel 3) we do not want to use the footprint determined by assign_wcs because the footprint in wcsinfo is too large. In this case we need to calculate the footprint in cube_build using only data for the appropriate channel.
Checklist