Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts PR 1193 (Ignore GwcsBoundingBoxWarning in JWST readers) #1194

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading