8000 JP-2819: Populate wavelength extension for MIRI LRS slitless by tapastro · Pull Request #6964 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-2819: Populate wavelength extension for MIRI LRS slitless #6964

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
merged 5 commits into from
Aug 26, 2022

Conversation

tapastro
Copy link
Contributor
@tapastro tapastro commented Aug 5, 2022

Resolves JP-2819

Closes #6963

This PR adds a function to assign_wcs to populate the wavelength extension of the calints level 2 output for MIRI LRS slitless data.

Not sure if this is addressing pixel locations appropriately (0-indexed) or if this addition is warranted - would like review on this approach.

Checklist

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)

@tapastro tapastro added this to the Build 9.0 milestone Aug 5, 2022
@tapastro tapastro requested review from nden and hbushouse August 5, 2022 17:40
@tapastro tapastro marked this pull request as draft August 5, 2022 17:40
@codecov
Copy link
codecov bot commented Aug 5, 2022

Codecov Report

Merging #6964 (bc81a5c) into master (390d8f9) will increase coverage by 0.01%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #6964      +/-   ##
==========================================
+ Coverage   79.57%   79.59%   +0.01%     
==========================================
  Files         411      411              
  Lines       37217    37242      +25     
==========================================
+ Hits        29616    29641      +25     
  Misses       7601     7601              
Flag Coverage Δ *Carryforward flag
nightly 79.54% <100.00%> (ø) Carriedforward from 1b736fb
unit 53.23% <88.88%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
jwst/assign_wcs/util.py 83.59% <85.71%> (+0.02%) ⬆️
jwst/assign_wcs/assign_wcs.py 86.11% <100.00%> (+6.48%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tapastro tapastro marked this pull request as ready for review August 16, 2022 17:06
@tapastro tapastro force-pushed the lrs-slitless-wavelengths branch from cfbdba2 to 5af4ceb Compare August 16, 2022 17:08
@tapastro tapastro changed the title Populate wavelength extension for MIRI LRS slitless JP-2819: Populate wavelength extension for MIRI LRS slitless Aug 16, 2022
Copy link
Collaborator
@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

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

Looks OK to me, but @nden should have the definitive word.

@hbushouse hbushouse merged commit c646fc1 into spacetelescope:master Aug 26, 2022
@hbushouse
Copy link
Collaborator

Rats, should've asked if you had run regtests on this before I merged it. I'm doing a run now and a handful of errors have already shown up in the log: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST/1938/console

@tapastro
Copy link
Contributor Author

Ah, sorry about that - slipped my mind. We should expect failures due to cal files having a populated extension, but I guess we'll have to see if there are any surprises.

@hbushouse
Copy link
Collaborator

Yes, these are not failures/differences (which I would expect), these are ERRORs.

@hbushouse
Copy link
Collaborator

I'm running test_miri_lrs_slitless locally right now to see if that's the one that's going bad.

@hbushouse
Copy link
Collaborator
hbushouse commented Aug 26, 2022

Yep, the LRS slitless test is now crashing in the photom step. I wonder if something in the photom step was also creating the 2D wavelength array and it doesn't need to do that anymore, since it should already be available in the input.

Oh, I wonder if the wavelength array needs to be 3D to match the shape of all the other data arrays when dealing with LRS slitless datasets coming from a rateints file.

@tapastro
Copy link
Contributor Author

The change from the initial commit to the use of the bbox changed the wavelength array shape from the equivalent shape of the data to the shape of the bbox, which is smaller than the data array. This is causing a mismatch when applying an operation to the wavelength array.

@tapastro
Copy link
Contributor Author

@nden Looking further into the relative indices, it appears that the use of bbox serves to truncate the first method to only include the non-nan extent - i.e. the bbox is working as expected, but it is a mismatch to the data array shape. Was the intent of the bbox use (i.e. the full frame coordinates mentioned above) meant to include the location on the full frame instead of the subarray? I tried to offset the indices generated in the first method by the xstart and ystart values defined in meta.subarray, but there is no defined wcs for those pixel positions.

@tapastro
Copy link
Contributor Author
tapastro commented Aug 26, 2022
8000

FWIW, bbox_grid appears to be in the same pixel-space as the original index_array (which had values x:{0:71}, y:{0:471}), but due to the truncation of the original space to exclude fully-nan regions, the extent of the bbox grid is x:{4:71}, y:{5:394}.

@hbushouse hbushouse added this to the Build 8.1.2 milestone Sep 7, 2022
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.

No wavelength solution for MIRI/LRS in _calints files after Spec2Pipeline
3 participants
0