From a2527c03bf1777529098d2b806990d5359e01aea Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:24:32 -0500 Subject: [PATCH] Revert "Ignore warning from spacetelescope/gwcs#522 (#1193)" This reverts commit 170d70f4d3d0e9db624b1346ae97b5ad5f7b2fbe. --- specutils/io/default_loaders/jwst_reader.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/specutils/io/default_loaders/jwst_reader.py b/specutils/io/default_loaders/jwst_reader.py index 2d6050e5b..423449c05 100644 --- a/specutils/io/default_loaders/jwst_reader.py +++ b/specutils/io/default_loaders/jwst_reader.py @@ -479,11 +479,7 @@ def _jwst_s2d_loader(filename, **kwargs): # Get the wavelength array from the GWCS object which returns a # tuple of (RA, Dec, lambda) - with warnings.catch_warnings(): - # https://github.com/spacetelescope/gwcs/pull/522 - warnings.filterwarnings( - "ignore", message="The bounding_box was set in C order.*") - grid = grid_from_bounding_box(wcs.bounding_box) + grid = grid_from_bounding_box(wcs.bounding_box) _, _, lam = wcs(*grid) _, _, lam_unit = wcs.output_frame.unit @@ -591,11 +587,7 @@ def _jwst_s3d_loader(filename, **kwargs): # tuple of (RA, Dec, lambda). # Since the spatial and spectral axes are orthogonal in s3d data, # it is much faster to compute a slice down the spectral axis. - with warnings.catch_warnings(): - # https://github.com/spacetelescope/gwcs/pull/522 - warnings.filterwarnings( - "ignore", message="The bounding_box was set in C order.*") - grid = grid_from_bounding_box(wcs.bounding_box)[:, :, 0, 0] + grid = grid_from_bounding_box(wcs.bounding_box)[:, :, 0, 0] _, _, wavelength_array = wcs(*grid) _, _, wavelength_unit = wcs.output_frame.unit