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
base: master
Are you sure you want to change the base?
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8476 +/- ##
==========================================
+ Coverage 57.93% 57.96% +0.03%
==========================================
Files 387 387
Lines 38839 38844 +5
==========================================
+ Hits 22502 22517 +15
+ Misses 16337 16327 -10 ☔ 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. |
@hbushouse @nden regression tests fail with this error:
Am I returning something incorrect or is this a recently added test that is setup in a different way that we had before. I need help with this. Thanks! |
I think, @nden, these lines are causing an issue: jwst/jwst/regtest/test_niriss_image.py Lines 62 to 63 in 3df35ef
And since you already run the step above this call, I do not think this is necessary as the step should set skipped flag as @braingram mentioned above. You can just check it (lines below). |
I made a PR that I hope will fix this test: #8489 |
@mcara Still need to address most recent comments and fix conflict that now exists in tweakreg_step.py |
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. |
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