Skip to content

VO: don't update coords on change to align_by #3706

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

Draft
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,18 @@ def test_link_type_autocoord(imviz_helper):

imviz_helper.plugins["Orientation"].align_by = "WCS"

# coordinates have not updated to the new center
assert vo_plugin.coord_follow_viewer_pan is False
ra_str, dec_str = vo_plugin.source.split()
np.testing.assert_allclose(float(ra_str), 284.2101962057667)
np.testing.assert_allclose(float(dec_str), 32.23616603681311)

# Large absolute tolerances due to WCS center coordinate bug (see issue 3225)
# Truth values may need to be reevaluated
np.testing.assert_allclose(float(ra_str), 326.7884142245305, atol=30)
np.testing.assert_allclose(float(dec_str), -9.905948925234416, atol=30)
vo_plugin.center_on_data()
ra_str, dec_str = vo_plugin.source.split()
# coordinates should now update based on the new alignment/zoom
np.testing.assert_allclose(float(ra_str), 239.18584957810944)
np.testing.assert_allclose(float(dec_str), 14.793145129887552)
assert vo_plugin.viewer_centered


@pytest.mark.remote_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from jdaviz.core.events import (
SnackbarMessage,
AddDataMessage,
RemoveDataMessage,
LinkUpdatedMessage,
RemoveDataMessage
)
from jdaviz.core.registries import tray_registry
from jdaviz.core.template_mixin import (
Expand Down Expand Up @@ -106,7 +105,6 @@ def __init__(self, *args, **kwargs):

self.hub.subscribe(self, AddDataMessage, handler=self.vue_center_on_data)
self.hub.subscribe(self, RemoveDataMessage, handler=self.vue_center_on_data)
self.hub.subscribe(self, LinkUpdatedMessage, handler=self.vue_center_on_data)

@observe("viewer_selected", type="change")
def vue_viewer_changed(self, _=None):
Expand Down
Loading