8000 JP-2198: Handle MIRI LRS SRCTYPE keyword in extract_1d by hbushouse · Pull Request #6212 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-2198: Handle MIRI LRS SRCTYPE keyword in extract_1d #6212

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 2 commits into from
Jul 13, 2021

Conversation

hbushouse
Copy link
Collaborator
@hbushouse hbushouse commented Jul 12, 2021

Closes #6208

Resolves JP-2198

Description

This PR fixes a problem with the SRCTYPE keyword not getting copied over to the x1d output of the extract_1d step when processing resampled MIRI LRS fixed-slit exposures. The problem lies in the fact that the source_type attribute is defined in the core schema within the target tree of meta data and also defined in the slitmeta.schema (for SlitModel). When the resample_spec step is applied to MIRI LRS fixed-slit exposures, the input is an ImageModel with SRCTYPE defined within the target part of the meta tree, but the output of resample_spec is a SlitModel, which is created without the SRCTYPE value getting copied to the SlitModel. The extract_1d is clever enough to look for SRCTYPE in both model.source_type (if the input is a SlitModel) and if that's blank - which it is in this case - then look for model.meta.target.source_type, where it finds the value. However, model.source_type was still blank (None) when slit-related keywords are copied to the output x1d model, so the keyword didn't show up.

This change simply copies the source_type value to the SlitModel in this situation, so it's available to be copied to the x1d output later in the flow.

Checklist

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

@codecov
Copy link
codecov bot commented Jul 12, 2021

Codecov Report

Merging #6212 (660d743) into master (9737be2) will decrease coverage by 0.36%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6212      +/-   ##
==========================================
- Coverage   77.53%   77.17%   -0.37%     
==========================================
  Files         402      402              
  Lines       34412    34603     +191     
==========================================
+ Hits        26682    26704      +22     
- Misses       7730     7899     +169     
Flag Coverage Δ *Carryforward flag
nightly 77.54% <ø> (ø) Carriedforward from bfa90c1
unit 55.11% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
jwst/extract_1d/extract.py 59.79% <0.00%> (-5.79%) ⬇️
jwst/extract_1d/extract_1d_step.py 80.43% <ø> (ø)

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 9737be2...660d743. Read the comment docs.

@hbushouse hbushouse merged commit e79b9f1 into spacetelescope:master Jul 13, 2021
@hbushouse hbushouse deleted the jp2198 branch July 13, 2021 12:16
loicalbert pushed a commit to talensgj/jwst that referenced this pull request Nov 5, 2021
…e#6212)

* JP-2198: Handle MIRI LRS SRCTYPE keyword in extract_1d

* update change log
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.

SRCTYPE keyword not getting copied to MIRI LRS x1d headers
2 participants
0