-
Notifications
You must be signed in to change notification settings - Fork 174
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
JP-2385: Changed logic in validation of grism bounding boxes #6579
Conversation
jwst/assign_wcs/util.py
Outdated
@@ -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) |
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.
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 Report
@@ 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
*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.
Looks good overall (that was a LOT of verbose instances removed!). Just a few minor comments/requests.
…; lower logging statements to DEBUG after verbosity removal
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