Skip to content

Commit

Permalink
adjusting links to enable pixel, wavelength linking in specviz2d
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsongreen committed Feb 29, 2024
1 parent 0e0a3b7 commit 3117943
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,13 @@ def _link_new_data(self, reference_data=None, data_to_be_linked=None):
linked_data.ndim < 3 and # Cube linking requires special logic. See below
ref_data.ndim < 3)
):
links = [LinkSame(linked_data.components[0], ref_data.components[0]),
LinkSame(linked_data.components[1], ref_data.components[1])]
if self.config == 'specviz2d':
links = [LinkSameWithUnits(linked_data.components[0], ref_data.components[1]),
LinkSameWithUnits(linked_data.components[1], ref_data.components[3])]
else:
links = [LinkSame(linked_data.components[0], ref_data.components[0]),
LinkSame(linked_data.components[1], ref_data.components[1])]

dc.add_link(links)
return

Expand Down

0 comments on commit 3117943

Please sign in to comment.