-
Notifications
You must be signed in to change notification settings - Fork 32
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
AL-850: adding tweakreg into stcal #267
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
+ Coverage 83.79% 84.01% +0.22%
==========================================
Files 35 39 +4
Lines 6998 7345 +347
==========================================
+ Hits 5864 6171 +307
- Misses 1134 1174 +40 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Brett Graham <[email protected]>
Co-authored-by: Brett Graham <[email protected]>
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 all your work on this.
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.
One more change. @emolter would you change the "unreleased" CHANGES.rst
version to 1.8.0 for this PR?
Do not merge at this time. somehow one of the last small changes broke s_region values in jwst. looking into it |
Long story short,
all of the assert statements pass. The documentation and other snooping I've done seem to indicate that a runtime_checkable protocol should be basically shorthand for all the I tried updating all the JWST code to pass in While perhaps not perfect, changing back to edit: still please do not merge until fully tested with jwst regtests |
Ok, all the regression tests for the JWST repo are now passing. It may be prudent to wait for more approvals of that PR, just in case changes are requested that require updating the stcal side for some reason. Other than that, this is ready to merge. @zacharyburnett what is the status of the romancal release - is it now safe to merge into stcal? @braingram are you happy with the changes now, and if so, can you remove the "changes requested" status? |
mypy | ||
types-requests | ||
commands = | ||
mypy src/stcal --config-file pyproject.toml |
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.
nice addition!
@@ -71,6 +71,9 @@ def _create_wcs_and_datamodel(fiducial_world, shape, pscale): | |||
|
|||
|
|||
class WcsInfo: | |||
""" |
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.
This object (and DataModel
) isn't added by this PR but I think could be removed with the changes in this PR. I'm not suggesting that we remove these as part of this PR. I opened an issue to track their removal: #273
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!
|
||
|
||
def reproject(wcs1, wcs2): | ||
def reproject(wcs1: gwcs.wcs.WCS, wcs2: gwcs.wcs.WCS) -> Callable: |
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 think this function needs to replicate what the jwst version does, which is the most general way. The use case that this is missing is passing sliced_wcs.SlicedLowLevelWCS
object. It's a JWST use case, that was requested by external users. There are tests for this in jwst:
https://github.com/spacetelescope/jwst/blob/master/jwst/resample/tests/test_utils.py#L191
Were they not moved to stcal or am I not seeing them?
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.
@nden Thanks for the comment. I think the first link goes to something unrelated, unless I'm missing something. There are two reproject
functions in jwst
, one in assign_wcs.util
and one in resample.resample_utils
. The one in resample
is not affected by this PR, and is the one that those tests cover.
In my opinion, consolidating these functions falls under the scope of this issue and does not need to be done here. But I can work on changing it if you like
Co-authored-by: Nadia Dencheva <[email protected]>
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.
Looks good to me. Thanks, @emolter!
Resolves AL-850
Partially resolves JP-3668
This PR moves the majority of the tweakreg functionality from JWST into stcal, such that it can be used by both Roman and JWST without needing to be maintained in both places. This relates to the alignment between images and to an absolute source catalog only, but not to finding sources within images - this is handled differently by the two observatories, and is split into its own step for Roman.
Several WCS-related utilities have also been moved into
alignment
or modified therein. These should also eventually be called by JWST and Roman from stcal and removed in those repositories.Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)