Skip to content

Commit

Permalink
Revert "Allow for small rounding errors in bbox for inverse" (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
nden authored Dec 18, 2024
1 parent ca12fbc commit 333c143
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gwcs/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,16 +490,11 @@ def invert(self, *args, **kwargs):
return result

def outside_footprint(self, world_arrays):
world_eps = 5.0 * np.finfo(np.float32).eps
eps_p = 1.0 + world_eps
eps_m = 1.0 - world_eps

world_arrays = list(world_arrays)

axes_types = set(self.output_frame.axes_type)
axes_phys_types = self.world_axis_physical_types
footprint = self.footprint()

not_numerical = False
if not utils.isnumerical(world_arrays[0]):
not_numerical = True
Expand All @@ -523,10 +518,9 @@ def outside_footprint(self, world_arrays):
axis_range[axis_range < d].max(),
axis_range[axis_range > d].min()
]
outside = (coord > range[0] * eps_p) & (coord < range[1] * eps_m)
outside = (coord >= range[0]) & (coord < range[1])
else:
outside = (coord < range[0] * eps_m) | (coord > range[1] * eps_p)

outside = (coord < range[0]) | (coord > range[1])
if np.any(outside):
if np.isscalar(coord):
coord = np.nan
Expand Down

0 comments on commit 333c143

Please sign in to comment.