8000 JP-2385: Changed logic in validation of grism bounding boxes by tapastro · Pull Request #6579 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-2385: Changed logic in validation of grism bounding boxes #6579

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 9 commits into from
Jan 19, 2022

Conversation

tapastro
Copy link
Contributor
@tapastro tapastro commented Jan 18, 2022

Closes #6576
Resolves JP-2385

Description

This PR addresses 1-width spectra being fed to combine_1d from NRC_WFSS data. The issue was found to be in validation of the grism bounding boxes, where 1-width extractions were being allowed. The logic was missing for both edges of the detector (i.e., xmin & xmax are both either 0 or 2047), and has now been added.

This PR also includes a somewhat-unrelated clean-up of extract_1d to remove a verbose flag getting thrown around but not accessible to users.

Checklist

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

@@ -769,7 +769,7 @@ def _create_grism_bbox(input_model, mmag_extract=99.0,
pts = np.array([[ymin, xmin], [ymax, xmax]])
ll = np.array([0, 0])
ur = np.array([input_model.meta.subarray.ysize, input_model.meta.subarray.xsize])
inidx = np.all(np.logical_and(ll <= pts, pts <= ur), axis=1)
inidx = np.all(np.logical_and(ll < pts, pts < (ur-1)), axis=1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reviewers: still not convinced I have this 100% correct - the goal being to disallow bboxes with width 1 on either edge. If xmin and xmax are both 0 or 2047 (in the case of xsize=2048), does this do what I'd like?

@codecov
Copy link
codecov bot commented Jan 18, 2022

Codecov Report

Merging #6579 (8ab93b9) into master (d322626) will decrease coverage by 1.26%.
The diff coverage is 47.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6579      +/-   ##
==========================================
- Coverage   74.56%   73.30%   -1.27%     
==========================================
  Files         413      413              
  Lines       36686    37516     +830     
==========================================
+ Hits        27356    27500     +144     
- Misses       9330    10016     +686     
Flag Coverage Δ *Carryforward flag
nightly 74.62% <89.13%> (ø) Carriedforward from d322626
unit 52.86% <21.42%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
jwst/associations/lib/rules_level2b.py 96.70% <ø> (ø)
jwst/extract_1d/extract.py 56.05% <33.33%> (-23.58%) ⬇️
jwst/assign_wcs/util.py 81.01% <100.00%> (-1.10%) ⬇️
jwst/transforms/integration.py 76.47% <0.00%> (-5.89%) ⬇️

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 9fd7012...8ab93b9. Read the comment docs.

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 good overall (that was a LOT of verbose instances removed!). Just a few minor comments/requests.

@hbushouse hbushouse merged commit d7f9740 into spacetelescope:master Jan 19, 2022
@tapastro tapastro deleted the jp-2385-1width-wfss-slit branch January 19, 2022 22:23
@hbushouse hbushouse modified the milestones: Build 8.0, Build 7.9 Jan 19, 2022
@stscijgbot-jp stscijgbot-jp mentioned this pull request Oct 14, 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.

Error in combine_1d for NRC WFSS exposures
2 participants
0