Skip to content

Commit

Permalink
fix specutils
Browse files Browse the repository at this point in the history
  • Loading branch information
nden committed Dec 12, 2024
1 parent ef8f619 commit 96de876
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gwcs/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Sky2Pix_TAN)
from astropy.modeling.parameters import _tofloat
from astropy.wcs.utils import celestial_frame_to_wcs, proj_plane_pixel_scales
from astropy.wcs.wcsapi.high_level_api import high_level_objects_to_values
from astropy.wcs.wcsapi.high_level_api import high_level_objects_to_values, values_to_high_level_objects

from astropy import units as u
from scipy import linalg, optimize
Expand Down Expand Up @@ -494,7 +494,9 @@ def outside_footprint(self, world_arrays):

axes_types = set(self.output_frame.axes_type)
footprint = self.footprint()
not_numerical = False
if not utils.isnumerical(world_arrays[0]):
not_numerical = True
world_arrays = high_level_objects_to_values(*world_arrays, low_level_wcs=self)
for axtyp in axes_types:
ind = np.asarray((np.asarray(self.output_frame.axes_type) == axtyp))
Expand All @@ -513,7 +515,8 @@ def outside_footprint(self, world_arrays):
else:
coord[outside] = np.nan
world_arrays[idim] = coord

if not_numerical:
world_arrays = values_to_high_level_objects(*world_arrays, low_level_wcs=self)
return world_arrays


Expand Down

0 comments on commit 96de876

Please sign in to comment.