Prepare for moving construct_wcs_corrector out to pipelines - #529
Conversation
|
Regression test for JWST: https://github.com/spacetelescope/RegressionTests/actions/runs/22769717421 |
This will also need a passing romancal regtest run. Would you help me understand how this relates to #528 or spacetelescope/tweakwcs#243 What is the plan here? Is this PR ready independent of spacetelescope/tweakwcs#243? |
Yes, it is independent, but the two follow-up PRs will depend on |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
=======================================
Coverage 91.79% 91.80%
=======================================
Files 63 63
Lines 8858 8855 -3
=======================================
- Hits 8131 8129 -2
+ Misses 727 726 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
My previous tests were set-up incorrectly. Starting new tests: |
|
Would it be easier (and equivalent) to just replace: stcal/src/stcal/tweakreg/tweakreg.py Lines 352 to 353 in 0e218f9 with: original_skycoord = _wcs_to_skycoord(corrector.original_wcs)
separation = original_skycoord.separation(aligned_skycoord) and drop the handling of |
57d26ba to
4cff4ce
Compare
This is an excellent observation! I see no reason not to do this. Initially I wanted to eliminate WCS copying for performance reasons but I kept |
be06f1a to
7c51aee
Compare
|
One side-effect of #529 (comment) is that now downstream tests fail because this is a breaking change (well, affecting only unit tests - not the actual code). |
Thanks. The failing jwst test looks like it's just testing the private stcal method _is_wcs_correction_small. I propose that we delete that test in jwst. Would you open a PR removing the test? One the test is removed the tests should pass with this PR and it can be approved and merged. |
|
yes, I'll do that |
|
@braingram Done in spacetelescope/jwst#10354 |
77a16b0 to
c780362
Compare
|
JWST has a build release this week - is it okay if we wait to merge this until after the release? I'm hoping to avoid any possible complications. |
for more information, see https://pre-commit.ci
c780362 to
7e95209
Compare
|
Regression tests: JWST with this PR: https://github.com/spacetelescope/RegressionTests/actions/runs/25901248519 Roman with this PR: https://github.com/spacetelescope/RegressionTests/actions/runs/25902060576 |
|
@tapastro Can this PR be merged? Also, is it possible to make a micro |
|
I have no objection to merging, but I want to better understand the impact of the changes here and in the JWST PR. Both require the tweakwcs release, but they do not depend on each other? If we make a release of As I understand it, we can merge the two PRs in any order? |
|
@tapastro No, This PR can be merged without merging JWST PR: it should not affect JWST at all. This is illustrated by the tests posted above which I copy here: JWST (regression test) with this PR only (without the associated JWST PR): https://github.com/spacetelescope/RegressionTests/actions/runs/25901248519 |
|
I take
back: the release already has been made - see https://github.com/spacetelescope/tweakwcs/releases/tag/0.9.0. Merging this PR should not affect neither JWST nor Roman pipelines. However, Roman would benefit only after the associated Roman PR is merged. Until then it will use JWST corrector. However, JWST should work with this PR and without merging spacetelescope/jwst#10306 (however, it should be merged when possible). This is proven by the regression test above. It works because for backwards compatibility I kept https://github.com/mcara/stcal/blob/23ee5ff0a1ffc690483cea90f66874b7b4b2c9f5/src/stcal/tweakreg/tweakreg.py#L383 in place. It will be removed in a future |
Co-authored-by: Brett Graham <brettgraham@gmail.com>
This PR is the first step of moving
construct_wcs_correctorto pipelines. This is the approach that I favor for fixing #528 in conjunction with a new release (0.9.0) oftweakwcsafter spacetelescope/tweakwcs#243 is merged.Associated Prs:
spacetelescope/romancal#2219
spacetelescope/jwst#10306
Tasks
docs/pageno-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)changes/<PR#>.breaking.rstnews fragment"git+https://github.com/<fork>/stcal@<branch>")jwstregression testromancalregression test