diff --git a/jdaviz/app.py b/jdaviz/app.py index 5003dbd175..117eea8e17 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -709,8 +709,8 @@ def _link_new_data(self, reference_data=None, data_to_be_linked=None): dc.add_link(links) return - elif (linked_data.meta.get('Plugin', None) == 'SpectralExtraction' or - (linked_data.meta.get('Plugin', None) == ('GaussianSmooth') and + elif (linked_data.meta.get('Plugin', None) == 'Spectral Extraction' or + (linked_data.meta.get('Plugin', None) == ('Gaussian Smooth') and linked_data.ndim < 3 and # Cube linking requires special logic. See below ref_data.ndim < 3) ): @@ -749,7 +749,7 @@ def _link_new_data(self, reference_data=None, data_to_be_linked=None): ref_index = ind if (len_linked_pixel == 2 and (linked_data.meta.get("Plugin", None) in - ['MomentMap', 'Collapse'])): + ['Moment Maps', 'Collapse'])): if pixel_coord == 'z': linked_index = pc_linked.index('x') elif pixel_coord == 'y': diff --git a/jdaviz/configs/cubeviz/plugins/moment_maps/tests/test_moment_maps.py b/jdaviz/configs/cubeviz/plugins/moment_maps/tests/test_moment_maps.py index 912c546d6d..d919cf776b 100644 --- a/jdaviz/configs/cubeviz/plugins/moment_maps/tests/test_moment_maps.py +++ b/jdaviz/configs/cubeviz/plugins/moment_maps/tests/test_moment_maps.py @@ -128,6 +128,10 @@ def test_moment_calculation(cubeviz_helper, spectrum1d_cube, tmp_path): assert len(dc.links) == 22 assert len(dc.external_links) == 4 # pixel linked # Link 3D z to 2D x and 3D y to 2D y + assert (dc.external_links[0].cids1[0].label == "Pixel Axis 0 [z]" and + dc.external_links[0].cids2[0].label == "Pixel Axis 1 [x]" and + dc.external_links[1].cids1[0].label == "Pixel Axis 1 [y]" and + dc.external_links[1].cids2[0].label == "Pixel Axis 0 [y]") # Coordinate display should be unaffected. label_mouseover._viewer_mouse_event(flux_viewer, {'event': 'mousemove',