Skip to content

Commit

Permalink
Revert "Ignore warning from spacetelescope/gwcs#522 (astropy#1193)"
Browse files Browse the repository at this point in the history
This reverts commit 170d70f.

Use spacetelescope/gwcs#526
  • Loading branch information
pllim committed Dec 4, 2024
1 parent f8a8d6a commit d0c667d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions specutils/io/default_loaders/jwst_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d0c667d

Please sign in to comment.