From 333c14398ca056277efb489ac2d9c653c97cafb7 Mon Sep 17 00:00:00 2001 From: Nadia Dencheva Date: Wed, 18 Dec 2024 16:37:08 -0500 Subject: [PATCH] Revert "Allow for small rounding errors in bbox for inverse" (#538) --- gwcs/wcs.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gwcs/wcs.py b/gwcs/wcs.py index 71c1d8f3..e0cbf191 100644 --- a/gwcs/wcs.py +++ b/gwcs/wcs.py @@ -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 @@ -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