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

To test out gwcs PR 526 #3290

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,7 @@ def load_data(self, file_obj, parser_reference=None, **kwargs):
parser = data_parser_registry.members.get(data_parser)

if parser is not None:
with warnings.catch_warnings():
# https://github.com/spacetelescope/gwcs/pull/522
warnings.filterwarnings(
"ignore", message="The bounding_box was set in C order.*")
parser(self, file_obj, **kwargs)
parser(self, file_obj, **kwargs)
else:
self._application_handler.load_data(file_obj)

Expand Down
7 changes: 1 addition & 6 deletions jdaviz/configs/mosviz/tests/test_parsers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import warnings
from zipfile import ZipFile

import pytest
Expand Down Expand Up @@ -146,11 +145,7 @@ def test_niriss_parser(mosviz_helper, tmp_path):
imview = mosviz_helper.app.get_viewer(mosviz_helper._default_image_viewer_reference_name)
x_pixcenter = (imview.state.x_max + imview.state.x_min)/2.0
y_pixcenter = (imview.state.y_max + imview.state.y_min)/2.0
with warnings.catch_warnings():
# https://github.com/spacetelescope/gwcs/pull/522
warnings.filterwarnings(
"ignore", message="The bounding_box was set in C order.*")
viewer_center_coord = imview.layers[0].layer.coords.pixel_to_world(x_pixcenter, y_pixcenter)
viewer_center_coord = imview.layers[0].layer.coords.pixel_to_world(x_pixcenter, y_pixcenter)
assert_allclose(viewer_center_coord.ra.deg, dc_tab["R.A."][0])
assert_allclose(viewer_center_coord.dec.deg, dc_tab["Dec."][0])

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ deps =
devdeps: photutils>=0.0.dev0
devdeps: git+https://github.com/astropy/regions.git
devdeps: git+https://github.com/astropy/specutils.git
devdeps: git+https://github.com/spacetelescope/gwcs.git
devdeps: git+https://github.com/WilliamJamieson/gwcs.git@bugfix/ignore_warnings_from_existing_files#egg=gwcs
devdeps: git+https://github.com/asdf-format/asdf.git
devdeps: git+https://github.com/astropy/asdf-astropy.git
devdeps: git+https://github.com/spacetelescope/stdatamodels.git
Expand Down