8000 JP-2331 Cube build footprint by jemorrison · Pull Request #6478 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged

Conversation

jemorrison
Copy link
Collaborator
@jemorrison jemorrison commented Nov 29, 2021

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

  • Tests
  • Documentation
  • Change log
  • Milestone
  • Label(s)
8000

Copy link
Collaborator
@drlaw1558 drlaw1558 left a 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.

@@ -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
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codecov
Copy link
codecov bot commented Nov 29, 2021

Codecov Report

Merging #6478 (74c43ff) into master (2f0bda5) will decrease coverage by 0.52%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Flag Coverage Δ *Carryforward flag
nightly 78.32% <100.00%> (ø) Carriedforward from d91cd7a
unit 55.62% <0.00%> (-0.04%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
jwst/cube_build/ifu_cube.py 72.58% <100.00%> (-11.68%) ⬇️
jwst/lib/v1_calculate.py 18.91% <0.00%> (-7.17%) ⬇️
jwst/stpipe/utilities.py 97.82% <0.00%> (+2.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f0bda5...74c43ff. Read the comment docs.

Copy link
Collaborator
@nden nden left a 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.

@jemorrison jemorrison merged commit 40953c7 into spacetelescope:master Nov 30, 2021
@jemorrison jemorrison deleted the Cube_build_footprint_JP-2331 branch August 11, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cube build uses incorrect footprint computation
3 participants
0