-
Notifications
You must be signed in to change notification settings - Fork 28
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
RCAL-698: fix TweakReg to allow for Roman datamodels as input #1089
RCAL-698: fix TweakReg to allow for Roman datamodels as input #1089
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1089 +/- ##
==========================================
- Coverage 76.73% 76.72% -0.02%
==========================================
Files 105 105
Lines 7054 7054
==========================================
- Hits 5413 5412 -1
- Misses 1641 1642 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
update context from 0052 to 0056
I'm not sure that this is doing what we need. It does accept a model container but it seems to run tweakreg on each input in a sequence. I thought that the plan is to run tweakreg on all the input files in the association as a group so that the final solution is more accurate. |
This reverts commit 951d2f8.
I left inline questions that I think need to be answered. A bit more generally the input/output support in Tweakreg needs to be
Some of these won't work and will need added support in datamodels but that can be added in a different PR. For example opening an association file with |
for more information, see https://pre-commit.ci
Done.
Items 1, 2, and 3 are currently supported. As you mentioned, we can implement item 4 later on. |
|
||
.. code-block:: python | ||
|
||
from romancal.tweakreg.tweakreg_step import TweakRegStep | ||
step = TweakRegStep() | ||
step.process([img]) | ||
step([img]) |
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.
We are advertising using Step.call
because this guarantees using all parameters and avoids confusion. The examples should read
output = TweakRegStep.call(...)
As written they use Step.run
which instantiates a new step and ignores any parameters users pass.
with pytest.raises(Exception) as exec_info: | ||
trs.TweakRegStep.call(input) |
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.
Yes, this is the correct signature to use.
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.
I am approving the PR but the documentation needs to be fixed before merging.
And it needs another regression test run.
Done and done. |
Resolves RCAL-698
This PR addresses code refactoring the
TweakRegStep
to allow Roman datamodels to be passed in toTweakReg
.Regression test results
All regression tests are successful (ran on Mar 4th): https://plwishmaster.stsci.edu:8081/job/RT/job/Roman-Developers-Pull-Requests/624/
Checklist
CHANGES.rst
under the corresponding subsection