AL-837: Calculate output WCS for resample from already-known s_region #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves AL-837
This PR simplifies the calculation of the output WCS for resample. Previously, the
wcs_from_footprints
function accepted a list of WCS objects, one for each input model, and computed the footprints from those WCS objects to pass into_calculate_new_wcs()
. However, computing the footprints here is unnecessary because that information is already stored in the S_REGION keyword. This PR makeswcs_from_footprints
take in an actual footprint instead, in the form of either a numpy array or an S_REGION string.This PR will require small changes to both jwst and romancal, both of which are using the
wcs_from_footprints
function. I'm not sure there's a way to avoid that. One other non-hidden function changed,compute_fiducial
, but this is not used for JWST or Romancal - both repositories have their own copy of a function with that name.Tasks
docs/
pageno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)"git+https://github.com/<fork>/stcal@<branch>"
)jwst
regression testromancal
regression testnews fragment change types...
changes/<PR#>.apichange.rst
: change to public APIchanges/<PR#>.bugfix.rst
: fixes an issuechanges/<PR#>.general.rst
: infrastructure or miscellaneous change