JP-4372: Fix edge cases in bounding box computations#254
Open
mcara wants to merge 6 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #254 +/- ##
==========================================
- Coverage 92.35% 90.97% -1.39%
==========================================
Files 11 11
Lines 2015 2072 +57
==========================================
+ Hits 1861 1885 +24
- Misses 154 187 +33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
944fc8b to
d5f2ab1
Compare
|
I can't say that I fully follow the new code - it seems like there are instances were 0.5 is added or removed from array values to generate some non-zero areas, but I don't understand what units x and y typically have here - pixel coordinates, or something else? It's not immediately clear to me that 0.5 is a small value. But I think the concept appears sound. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a crash in the JWST pipeline which happens when one of the images has three sources detected and they lie on almost a straight line. The convex hull of these points is a triangle with minimal height resulting in the spherical polygon being considered degenerate since all vertices lie on a great circle.
This PR replaces convex hull with a bounding rectangle of height or with of no less than 1 pixel only when the spherical polygon created with the convex hull is degenerate.
Closes JP-4372
Regression tests:
CRDS_CONTEXT=jwst_1555.pmap): https://github.com/spacetelescope/RegressionTests/actions/runs/27310278928