-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add a check for separation and tolerance in tweakreg #8476
Conversation
Agreed with Howard's comments. These need to be warnings. |
I took into account Howard suggestion as well as (in part) @mairanteodoro suggestion in a different PR about putting common logging and step-skipping code into a single function. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8476 +/- ##
==========================================
- Coverage 57.97% 57.97% -0.01%
==========================================
Files 387 387
Lines 38830 38824 -6
==========================================
- Hits 22513 22507 -6
Misses 16317 16317 ☔ View full report in Codecov by Sentry. |
Another regression test here: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1447/ Previous test was failing because input models' meta could not be updated with info about step being skipped (models were not yet open) and https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1448/ |
@braingram what is your opinion on this change: 56a1108 ? |
Thanks for the ping. I will look at this later today. One general question, are these changes required for the check in the title of this PR? |
No. But... @mairanteodoro is right about similar code being used in too many places. |
Perhaps a follow-up PR cleaning up the error handling and logging is called for? It could include an update to the I rebased and reopened #8424 when this PR was only the parameter checks thinking it would have no conflicts. I don't think that's the case if the additional cleanup in 56a1108 is included. Since they're not required for the parameter changes I think they make sense to put in a different cleanup PR. |
OK. I'll remove logging function and simplify this PR. |
Thanks for updating the PR. I added a few comments. |
My apologies: somehow I thought I pushed latest changes last Friday. |
Would you add a unit test (or 2) to verify the check. It would be helpful to avoid losing this in a refactor. |
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.
Thanks for adding the test. LGTM.
I started regtests with this PR here: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1478/
@mcara the regtest run had 2 failures:
Is this second one related to this PR? |
Yes, see #8476 (comment) |
Thanks. I attempted to dismiss my own review (since the regression test fails with this PR). However I didn't see a button to dismiss my own review so I re-requested myself as a reviewer. I didn't follow the test changes in #8450 #8477 and #8489 close enough to understand why it fails with this PR. If a review is helpful please feel free to ping me. |
That test was likely failing because checking the value of |
@mcara Now that this PR has removed the setting of |
@mcara Can you please update the regtest at /jwst/regtest/test_niriss_image.py::test_niriss_tweakreg_no_sources as described above, so that it doesn't fail anymore and we can get this merged? |
There were 6 failures in the latest regtest run, all of which are known and unrelated to this PR. So this looks good now. |
This PR adds a check that
(abs_)separation
>sqrt(2) * (abs_)tolerance
input parameters to thetweakreg
step. It also adds a comment in the docstring about these parameters.Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR