-
Notifications
You must be signed in to change notification settings - Fork 169
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-3129: Fix WCS correction validation #7494
Conversation
dae9b09
to
91bbb8a
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #7494 +/- ##
==========================================
- Coverage 77.59% 77.59% -0.01%
==========================================
Files 452 452
Lines 36095 36097 +2
==========================================
+ Hits 28009 28010 +1
- Misses 8086 8087 +1
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
91bbb8a
to
9b941b5
Compare
9b941b5
to
1fc7b23
Compare
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.
Looking good to me.
# Increase matching tolerance to pass '_is_wcs_correction_small' test. | ||
# This test would detect large corrections and therefore | ||
# would flag the quality of the fit as "bad" and therefore, it will not | ||
# apply computed corrections ('fit_quality_is_good' test was designed by | ||
# apply computed corrections ('_is_wcs_correction_small' test was designed by | ||
# Warren for evaluating "quality of fit" for HAP). |
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.
Is this comment still valid?
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.
LGTM
Resolves JP-3129
tweakreg_step
has code that "validates" the fit by checking that corrections (as measured by the change of the positions of image boundary vertices before and after WCS corrections) are smaller than10*tolerance
. This is wrong check since valid corrections can be larger than10*tolerance
since usually the magnitude of corrections is dependent onsearchrad
parameter as well and usuallysearchrad >> tolerance
. Any correction smaller thansearchrad
but larger than10*tolerance
is a valid correction whenuse2dhist=True
. Alternatively,xoffset
andyoffset
can determine the magnitude of corrections. The origin of the factor10
in10*tolerance
is unexplained too.This PR combines the two quantities -
searchrad
(orxoffset
andyoffset
) andtolerance
- to make this code work for a larger set of step parameters.Checklist for maintainers
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR
Regression tests: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/599/