Skip to content

Commit

Permalink
do not deepcopy wcs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Dec 19, 2024
1 parent 1c2f9a8 commit 548955f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions jwst/resample/resample_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,10 @@ def reproject(wcs1, wcs2):
# 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 = wcs1.world_to_pixel_values
except AttributeError as err:
raise TypeError("Input should be a WCS") from err


def _reproject(x, y):
sky = forward_transform(x, y)
flat_sky = []
Expand Down
1 change: 0 additions & 1 deletion jwst/skymatch/skymatch_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def _imodel2skyim(self, image_model, index):
.format(image_model.meta.filename))

wcs = deepcopy(image_model.meta.wcs)
wcs.bounding_box = None

sky_im = SkyImage(
image=image_model.data,
Expand Down

0 comments on commit 548955f

Please sign in to comment.