Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Nov 9, 2023
1 parent bc3be34 commit 7cf69ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def __init__(self, configuration=None, *args, **kwargs):

# Imviz linking
self._wcs_only_label = "_WCS_ONLY"
self._link_type = None
if self.config == "imviz":
self._link_type = None
self._wcs_use_affine = None

# Subscribe to messages indicating that a new viewer needs to be
Expand Down
11 changes: 1 addition & 10 deletions jdaviz/configs/imviz/tests/test_linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class TestLink_WCS_NoWCS(BaseImviz_WCS_NoWCS, BaseLinkHandler):
def test_wcslink_fallback_pixels(self):
self.imviz.link_data(link_type='wcs', wcs_fallback_scheme='pixels', error_on_fail=True)

assert self.viewer.get_link_type('has_wcs[SCI,1]') == 'self'
assert self.viewer.get_link_type('no_wcs[SCI,1]') == 'pixels'
assert self.viewer.get_link_type('has_wcs[SCI,1]') == 'wcs'

# Also check the coordinates display: Last loaded is on top.

Expand All @@ -58,14 +57,6 @@ def test_wcslink_fallback_pixels(self):
'World 22h30m04.8674s -20d49m59.9990s (ICRS)',
'337.5202808000 -20.8333330600 (deg)')

def test_wcslink_nofallback_noerror(self):
self.imviz.link_data(link_type='wcs', wcs_fallback_scheme=None)
self.check_all_pixel_links() # Keeps old links because operation failed silently

def test_wcslink_nofallback_error(self):
with pytest.raises(ValueError, match='valid WCS'):
self.imviz.link_data(link_type='wcs', wcs_fallback_scheme=None, error_on_fail=True)


class TestLink_WCS_FakeWCS(BaseImviz_WCS_NoWCS, BaseLinkHandler):

Expand Down

0 comments on commit 7cf69ac

Please sign in to comment.