Skip to content
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

Update resample step WCS reproject after JP-3824 bugfix in stcal #9023

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions jwst/resample/resample_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,8 @@ def reproject(wcs1, wcs2):
"""

try:
# Here we want to use the WCS API functions so that a Sliced WCS
# will work as well. However, the API functions do not accept
# keyword arguments and `with_bounding_box=False` cannot be passsed.
# We delete the bounding box on a copy of the WCS - yes, inefficient.
forward_transform = wcs1.pixel_to_world_values
wcs_no_bbox = deepcopy(wcs2)
wcs_no_bbox.bounding_box = None
backward_transform = wcs_no_bbox.world_to_pixel_values
backward_transform = wcs2.world_to_pixel_values
except AttributeError as err:
raise TypeError("Input should be a WCS") from err

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"scikit-image>=0.20.0",
"scipy>=1.14.1",
"spherical-geometry>=1.2.22",
"stcal @ git+https://github.com/spacetelescope/stcal.git@main",
"stcal @ git+https://github.com/mcara/stcal.git@fix-bbox-shift-make-wcs",
"stdatamodels @ git+https://github.com/spacetelescope/stdatamodels.git@main",
"stpipe @ git+https://github.com/spacetelescope/stpipe.git@main",
"stsci.imagestats>=1.6.3",
Expand Down
Loading