diff --git a/specutils/io/default_loaders/jwst_reader.py b/specutils/io/default_loaders/jwst_reader.py index 423449c05..2d6050e5b 100644 --- a/specutils/io/default_loaders/jwst_reader.py +++ b/specutils/io/default_loaders/jwst_reader.py @@ -479,7 +479,11 @@ def _jwst_s2d_loader(filename, **kwargs): # Get the wavelength array from the GWCS object which returns a # tuple of (RA, Dec, lambda) - grid = grid_from_bounding_box(wcs.bounding_box) + 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) _, _, lam = wcs(*grid) _, _, lam_unit = wcs.output_frame.unit @@ -587,7 +591,11 @@ 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. - grid = grid_from_bounding_box(wcs.bounding_box)[:, :, 0, 0] + 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] _, _, wavelength_array = wcs(*grid) _, _, wavelength_unit = wcs.output_frame.unit