From 9ab27fb0c49d44d8328c7240dd66adca8496fede Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Fri, 15 Mar 2024 12:05:44 -0400 Subject: [PATCH 01/11] Experimenting with fixes --- jdaviz/app.py | 12 +++++++++++- .../imviz/plugins/orientation/orientation.py | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index 2a462fc546..d1b068ffe1 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -2033,11 +2033,21 @@ def vue_data_item_remove(self, event): if orientation_plugin is not None: orient = orientation_plugin.orientation.selected self._reparent_subsets(data, new_parent=orient) + print(f"Removing item, have {orient} selected") else: self._reparent_subsets(data) - # Make sure the data isn't loaded in any viewers + # Make sure the data isn't loaded in any viewers and isn't the selected orientation for viewer_id in self._viewer_store: + print(f"Checking {viewer_id}") + if orientation_plugin is not None: + orientation_plugin.viewer.selected = viewer_id + print(f"Choices are {orientation_plugin.orientation.choices}") + orient = orientation_plugin.orientation.selected + print(f"{orient} is currently selected, data_label is {data_label}") + if orient == data_label: + print(f"Changing selected orientation for {viewer_id}") + orientation_plugin.orientation.selected = "Default orientation" self.remove_data_from_viewer(viewer_id, data_label) self.data_collection.remove(self.data_collection[data_label]) diff --git a/jdaviz/configs/imviz/plugins/orientation/orientation.py b/jdaviz/configs/imviz/plugins/orientation/orientation.py index ef9d095098..eeb64072b6 100644 --- a/jdaviz/configs/imviz/plugins/orientation/orientation.py +++ b/jdaviz/configs/imviz/plugins/orientation/orientation.py @@ -327,6 +327,8 @@ def add_orientation(self, rotation_angle=None, east_left=None, label=None, wrt_data = self.viewer.selected_obj.first_loaded_data if wrt_data is None: # Nothing in viewer return + else: + print(wrt_data) rotation_angle = self.rotation_angle_deg(rotation_angle) if east_left is None: @@ -356,9 +358,15 @@ def add_orientation(self, rotation_angle=None, east_left=None, label=None, # add orientation layer to all viewers: for viewer_ref in self.app._viewer_store: + print(f"Adding {label} to {viewer_ref}") self._add_data_to_viewer(label, viewer_ref) if set_on_create: + # Not sure why this is sometimes missing, but we can add it here + print("Running set on create") + if label not in self.orientation.choices: + print(f"Trying to add {label} to choices") + self.orientation.choices += [label] self.orientation.selected = label def _add_data_to_viewer(self, data_label, viewer_id): @@ -366,6 +374,7 @@ def _add_data_to_viewer(self, data_label, viewer_id): wcs_only_layers = viewer.state.wcs_only_layers if data_label not in wcs_only_layers: + print(f"Adding {data_label} to {viewer_id}") self.app.add_data_to_viewer(viewer_id, data_label) def _on_viewer_added(self, msg): @@ -393,6 +402,9 @@ def _send_wcs_layers_to_all_viewers(self, *args, **kwargs): self.link_type_selected == 'WCS' ): self.orientation.selected = base_wcs_layer_label + print(f"Changed selected in _send_wcs_layers for {viewer_ref}") + else: + print("Did _send_wcs_layers but didn't change orientation.selected") def _on_data_add_to_viewer(self, msg): all_wcs_only_layers = all( @@ -409,7 +421,9 @@ def vue_add_orientation(self, *args, **kwargs): @observe('orientation_layer_selected') def _change_reference_data(self, *args, **kwargs): + print("Running _change_reference_data") if self._refdata_change_available: + print("refdata change is available") self.app._change_reference_data( self.orientation.selected, viewer_id=self.viewer.selected ) @@ -473,8 +487,12 @@ def _on_viewer_change(self, msg={}): # don't update choices until viewer is available: ref_data = self.ref_data if hasattr(self, 'viewer') and ref_data is not None: + print(f"Triggered viewer_selected with ref_data {ref_data.label}") if ref_data.label in self.orientation.choices: self.orientation.selected = ref_data.label + else: + print(f"{ref_data.label} not in {self.orientation.choices}!") + #self.orientation.selected = "Default orientation" def create_north_up_east_left(self, label="North-up, East-left", set_on_create=False): """ From 6c4a5e06d94417d969040bf2878978946c8d3a35 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Fri, 15 Mar 2024 15:28:18 -0400 Subject: [PATCH 02/11] Fix wrong viewer's orientation being updated in plugin from viewer data menu change --- jdaviz/app.py | 6 +++++- jdaviz/configs/imviz/plugins/orientation/orientation.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index d1b068ffe1..f680c9c0b4 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -507,9 +507,11 @@ def _change_reference_data(self, new_refdata_label, viewer_id=None): return if viewer_id is None: + print("Viewer ID is None") viewer = self._jdaviz_helper.default_viewer._obj else: viewer = self.get_viewer(viewer_id) + print(f"Viewer ID is {viewer_id}") old_refdata = viewer.state.reference_data @@ -2032,8 +2034,10 @@ def vue_data_item_remove(self, event): orientation_plugin = self._jdaviz_helper.plugins.get("Orientation") if orientation_plugin is not None: orient = orientation_plugin.orientation.selected + print(f"Removing {data_label}, have {orient} selected") + if orient == data_label: + orient = "Default orientation" self._reparent_subsets(data, new_parent=orient) - print(f"Removing item, have {orient} selected") else: self._reparent_subsets(data) diff --git a/jdaviz/configs/imviz/plugins/orientation/orientation.py b/jdaviz/configs/imviz/plugins/orientation/orientation.py index eeb64072b6..07399fa516 100644 --- a/jdaviz/configs/imviz/plugins/orientation/orientation.py +++ b/jdaviz/configs/imviz/plugins/orientation/orientation.py @@ -448,7 +448,8 @@ def _on_refdata_change(self, msg): if msg.data.label not in self.orientation.choices: return - self.orientation.selected = msg.data.label + if msg.viewer_id == self.viewer.selected: + self.orientation.selected = msg.data.label # we never want to highlight subsets of pixels within WCS-only layers, # so if this layer is an ImageSubsetLayerState on a WCS-only layer, From 30dfa1c04bb7c5611157999857dc789ad7bed357 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 13:20:41 -0400 Subject: [PATCH 03/11] Fix orientation not being selected in viewer after deleting previous selection --- jdaviz/app.py | 7 ------- .../imviz/plugins/orientation/orientation.py | 19 ++++--------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index f680c9c0b4..bf40a2563d 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -507,11 +507,9 @@ def _change_reference_data(self, new_refdata_label, viewer_id=None): return if viewer_id is None: - print("Viewer ID is None") viewer = self._jdaviz_helper.default_viewer._obj else: viewer = self.get_viewer(viewer_id) - print(f"Viewer ID is {viewer_id}") old_refdata = viewer.state.reference_data @@ -2034,7 +2032,6 @@ def vue_data_item_remove(self, event): orientation_plugin = self._jdaviz_helper.plugins.get("Orientation") if orientation_plugin is not None: orient = orientation_plugin.orientation.selected - print(f"Removing {data_label}, have {orient} selected") if orient == data_label: orient = "Default orientation" self._reparent_subsets(data, new_parent=orient) @@ -2043,14 +2040,10 @@ def vue_data_item_remove(self, event): # Make sure the data isn't loaded in any viewers and isn't the selected orientation for viewer_id in self._viewer_store: - print(f"Checking {viewer_id}") if orientation_plugin is not None: orientation_plugin.viewer.selected = viewer_id - print(f"Choices are {orientation_plugin.orientation.choices}") orient = orientation_plugin.orientation.selected - print(f"{orient} is currently selected, data_label is {data_label}") if orient == data_label: - print(f"Changing selected orientation for {viewer_id}") orientation_plugin.orientation.selected = "Default orientation" self.remove_data_from_viewer(viewer_id, data_label) diff --git a/jdaviz/configs/imviz/plugins/orientation/orientation.py b/jdaviz/configs/imviz/plugins/orientation/orientation.py index 07399fa516..cf2ceff474 100644 --- a/jdaviz/configs/imviz/plugins/orientation/orientation.py +++ b/jdaviz/configs/imviz/plugins/orientation/orientation.py @@ -327,8 +327,6 @@ def add_orientation(self, rotation_angle=None, east_left=None, label=None, wrt_data = self.viewer.selected_obj.first_loaded_data if wrt_data is None: # Nothing in viewer return - else: - print(wrt_data) rotation_angle = self.rotation_angle_deg(rotation_angle) if east_left is None: @@ -358,14 +356,11 @@ def add_orientation(self, rotation_angle=None, east_left=None, label=None, # add orientation layer to all viewers: for viewer_ref in self.app._viewer_store: - print(f"Adding {label} to {viewer_ref}") self._add_data_to_viewer(label, viewer_ref) if set_on_create: # Not sure why this is sometimes missing, but we can add it here - print("Running set on create") if label not in self.orientation.choices: - print(f"Trying to add {label} to choices") self.orientation.choices += [label] self.orientation.selected = label @@ -374,7 +369,6 @@ def _add_data_to_viewer(self, data_label, viewer_id): wcs_only_layers = viewer.state.wcs_only_layers if data_label not in wcs_only_layers: - print(f"Adding {data_label} to {viewer_id}") self.app.add_data_to_viewer(viewer_id, data_label) def _on_viewer_added(self, msg): @@ -402,9 +396,6 @@ def _send_wcs_layers_to_all_viewers(self, *args, **kwargs): self.link_type_selected == 'WCS' ): self.orientation.selected = base_wcs_layer_label - print(f"Changed selected in _send_wcs_layers for {viewer_ref}") - else: - print("Did _send_wcs_layers but didn't change orientation.selected") def _on_data_add_to_viewer(self, msg): all_wcs_only_layers = all( @@ -421,14 +412,12 @@ def vue_add_orientation(self, *args, **kwargs): @observe('orientation_layer_selected') def _change_reference_data(self, *args, **kwargs): - print("Running _change_reference_data") if self._refdata_change_available: - print("refdata change is available") self.app._change_reference_data( self.orientation.selected, viewer_id=self.viewer.selected ) viewer_item = self.app._viewer_item_by_id(self.viewer.selected) - if viewer_item != self.orientation.selected: + if viewer_item['reference_data_label'] != self.orientation.selected: viewer_item['reference_data_label'] = self.orientation.selected def _on_refdata_change(self, msg): @@ -488,12 +477,12 @@ def _on_viewer_change(self, msg={}): # don't update choices until viewer is available: ref_data = self.ref_data if hasattr(self, 'viewer') and ref_data is not None: - print(f"Triggered viewer_selected with ref_data {ref_data.label}") if ref_data.label in self.orientation.choices: self.orientation.selected = ref_data.label else: - print(f"{ref_data.label} not in {self.orientation.choices}!") - #self.orientation.selected = "Default orientation" + self.orientation.selected = "Default orientation" + # Need to manually trigger this here for...reasons + self._change_reference_data() def create_north_up_east_left(self, label="North-up, East-left", set_on_create=False): """ From 26ffea62b18546ca3893e6b80b6737ccc9fbda12 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 13:25:42 -0400 Subject: [PATCH 04/11] Add PR number to changelog --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c8bf57f547..44548f7f96 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -41,7 +41,7 @@ Imviz ^^^^^ - There is now option for image rotation in Orientation (was Links Control) plugin. - This feature requires WCS linking. [#2179, #2673, #2699, #2734] + This feature requires WCS linking. [#2179, #2673, #2699, #2734, #2759] - Add "Random" colormap for visualizing image segmentation maps. [#2671] From 8b90c9218e7ae5c53880bfef3c95e86b23f443bf Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 13:44:54 -0400 Subject: [PATCH 05/11] Use base_wcs_layer_label --- jdaviz/app.py | 5 +++-- jdaviz/configs/imviz/plugins/orientation/orientation.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index bf40a2563d..7a4e48e135 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -2031,9 +2031,10 @@ def vue_data_item_remove(self, event): data = self.data_collection[data_label] orientation_plugin = self._jdaviz_helper.plugins.get("Orientation") if orientation_plugin is not None: + from jdaviz.configs.imviz.helper import base_wcs_layer_label orient = orientation_plugin.orientation.selected if orient == data_label: - orient = "Default orientation" + orient = base_wcs_layer_label self._reparent_subsets(data, new_parent=orient) else: self._reparent_subsets(data) @@ -2044,7 +2045,7 @@ def vue_data_item_remove(self, event): orientation_plugin.viewer.selected = viewer_id orient = orientation_plugin.orientation.selected if orient == data_label: - orientation_plugin.orientation.selected = "Default orientation" + orientation_plugin.orientation.selected = base_wcs_layer_label self.remove_data_from_viewer(viewer_id, data_label) self.data_collection.remove(self.data_collection[data_label]) diff --git a/jdaviz/configs/imviz/plugins/orientation/orientation.py b/jdaviz/configs/imviz/plugins/orientation/orientation.py index cf2ceff474..9b3fec5f51 100644 --- a/jdaviz/configs/imviz/plugins/orientation/orientation.py +++ b/jdaviz/configs/imviz/plugins/orientation/orientation.py @@ -480,7 +480,7 @@ def _on_viewer_change(self, msg={}): if ref_data.label in self.orientation.choices: self.orientation.selected = ref_data.label else: - self.orientation.selected = "Default orientation" + self.orientation.selected = base_wcs_layer_label # Need to manually trigger this here for...reasons self._change_reference_data() From 82e3c826a30a166333d8b547c5b7e4be0de1e644 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 14:24:38 -0400 Subject: [PATCH 06/11] Add test for orientation change --- jdaviz/configs/imviz/tests/test_orientation.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jdaviz/configs/imviz/tests/test_orientation.py b/jdaviz/configs/imviz/tests/test_orientation.py index ac05c32477..9a70480870 100644 --- a/jdaviz/configs/imviz/tests/test_orientation.py +++ b/jdaviz/configs/imviz/tests/test_orientation.py @@ -130,12 +130,17 @@ def test_N_up_multi_viewer(self): # This would set a different reference to second viewer. viewer_2 = self.imviz.create_image_viewer() self.imviz.app.add_data_to_viewer("imviz-1", "has_wcs_1[SCI,1]") - lc_plugin.viewer = "imviz-1" + lc_plugin.viewer.selected = "imviz-1" lc_plugin._obj.create_north_up_east_right(set_on_create=True) assert self.viewer.state.reference_data.label == "North-up, East-left" assert viewer_2.state.reference_data.label == "North-up, East-right" + # Change orientation in imviz-1 from UI and ensure plugin selection is the same + lc_plugin.viewer.selected = "imviz-0" + self.imviz.app._change_reference_data("Default orientation", "imviz-1") + assert lc_plugin.orientation.selected == "North-up, East-left" + # Both viewers should revert back to same reference when pixel-linked. lc_plugin.link_type = 'Pixels' assert self.viewer.state.reference_data.label == "has_wcs_1[SCI,1]" @@ -151,7 +156,7 @@ def test_N_up_multi_viewer(self): def test_custom_orientation(self): lc_plugin = self.imviz.plugins['Orientation'] lc_plugin.link_type = 'WCS' - lc_plugin.viewer = "imviz-0" + lc_plugin.viewer.selected = "imviz-0" lc_plugin.rotation_angle = 42 # Triggers auto-label lc_plugin._obj.add_orientation(rotation_angle=None, east_left=True, label=None, set_on_create=True, wrt_data=None) From 8f1343a661f7d5b417ef693f6c4f0635b3fcb0c1 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 14:46:32 -0400 Subject: [PATCH 07/11] Better fix for ref data deletion bug --- jdaviz/app.py | 8 +++----- jdaviz/configs/imviz/plugins/orientation/orientation.py | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index 7a4e48e135..fe18980de1 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -2040,12 +2040,10 @@ def vue_data_item_remove(self, event): self._reparent_subsets(data) # Make sure the data isn't loaded in any viewers and isn't the selected orientation - for viewer_id in self._viewer_store: + for viewer_id, viewer in self._viewer_store.items(): if orientation_plugin is not None: - orientation_plugin.viewer.selected = viewer_id - orient = orientation_plugin.orientation.selected - if orient == data_label: - orientation_plugin.orientation.selected = base_wcs_layer_label + if viewer.state.reference_data.label == data_label: + self._change_reference_data(base_wcs_layer_label, viewer_id) self.remove_data_from_viewer(viewer_id, data_label) self.data_collection.remove(self.data_collection[data_label]) diff --git a/jdaviz/configs/imviz/plugins/orientation/orientation.py b/jdaviz/configs/imviz/plugins/orientation/orientation.py index 9b3fec5f51..a3e7b016b4 100644 --- a/jdaviz/configs/imviz/plugins/orientation/orientation.py +++ b/jdaviz/configs/imviz/plugins/orientation/orientation.py @@ -479,10 +479,6 @@ def _on_viewer_change(self, msg={}): if hasattr(self, 'viewer') and ref_data is not None: if ref_data.label in self.orientation.choices: self.orientation.selected = ref_data.label - else: - self.orientation.selected = base_wcs_layer_label - # Need to manually trigger this here for...reasons - self._change_reference_data() def create_north_up_east_left(self, label="North-up, East-left", set_on_create=False): """ From 2e5c25e18caea0c74529e797d891294d079e6bda Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 15:01:48 -0400 Subject: [PATCH 08/11] Only do this if wcs linked, just in case --- jdaviz/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index fe18980de1..604bf874d7 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -2041,7 +2041,7 @@ def vue_data_item_remove(self, event): # Make sure the data isn't loaded in any viewers and isn't the selected orientation for viewer_id, viewer in self._viewer_store.items(): - if orientation_plugin is not None: + if orientation_plugin is not None and self._link_type == 'wcs': if viewer.state.reference_data.label == data_label: self._change_reference_data(base_wcs_layer_label, viewer_id) self.remove_data_from_viewer(viewer_id, data_label) From e8517bd60b929b6cfd248046b9646095fa2eb8ff Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 18 Mar 2024 15:19:26 -0400 Subject: [PATCH 09/11] Add test for last bug --- jdaviz/configs/imviz/tests/test_orientation.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jdaviz/configs/imviz/tests/test_orientation.py b/jdaviz/configs/imviz/tests/test_orientation.py index 9a70480870..8ac04d562a 100644 --- a/jdaviz/configs/imviz/tests/test_orientation.py +++ b/jdaviz/configs/imviz/tests/test_orientation.py @@ -165,6 +165,24 @@ def test_custom_orientation(self): class TestDeleteOrientation(BaseImviz_WCS_WCS): + def test_delete_orientation_multi_viewer(self): + lc_plugin = self.imviz.plugins['Orientation'] + lc_plugin.link_type = 'WCS' + + # Should automatically be applied as reference to first viewer. + lc_plugin._obj.create_north_up_east_left(set_on_create=True) + + # This would set a different reference to second viewer. + viewer_2 = self.imviz.create_image_viewer() + self.imviz.app.add_data_to_viewer("imviz-1", "has_wcs_1[SCI,1]") + lc_plugin.viewer.selected = "imviz-1" + lc_plugin.orientation.selected = "North-up, East-left" + + self.imviz.app.vue_data_item_remove({"item_name": "North-up, East-left"}) + + assert self.viewer.state.reference_data.label == "Default orientation" + assert viewer_2.state.reference_data.label == "Default orientation" + @pytest.mark.parametrize("klass", [EllipseSkyRegion, RectangleSkyRegion]) @pytest.mark.parametrize( ("angle", "sbst_theta"), From 07c2927b5981b46742a27b2fcfb69061f328a042 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen <39831871+rosteen@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:22:43 -0400 Subject: [PATCH 10/11] Revert unneeded change --- jdaviz/configs/imviz/tests/test_orientation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jdaviz/configs/imviz/tests/test_orientation.py b/jdaviz/configs/imviz/tests/test_orientation.py index 8ac04d562a..8a0b3a32aa 100644 --- a/jdaviz/configs/imviz/tests/test_orientation.py +++ b/jdaviz/configs/imviz/tests/test_orientation.py @@ -130,7 +130,8 @@ def test_N_up_multi_viewer(self): # This would set a different reference to second viewer. viewer_2 = self.imviz.create_image_viewer() self.imviz.app.add_data_to_viewer("imviz-1", "has_wcs_1[SCI,1]") - lc_plugin.viewer.selected = "imviz-1" + lc_plugin.viewer = "imviz-1" + lc_plugin._obj.create_north_up_east_right(set_on_create=True) assert self.viewer.state.reference_data.label == "North-up, East-left" @@ -156,7 +157,8 @@ def test_N_up_multi_viewer(self): def test_custom_orientation(self): lc_plugin = self.imviz.plugins['Orientation'] lc_plugin.link_type = 'WCS' - lc_plugin.viewer.selected = "imviz-0" + lc_plugin.viewer = "imviz-0" + lc_plugin.rotation_angle = 42 # Triggers auto-label lc_plugin._obj.add_orientation(rotation_angle=None, east_left=True, label=None, set_on_create=True, wrt_data=None) From 5641fdead5ed7a9ab43130faebbfc703e88f3e6d Mon Sep 17 00:00:00 2001 From: Ricky O'Steen <39831871+rosteen@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:13:15 -0400 Subject: [PATCH 11/11] Apply suggestions from code review Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> --- jdaviz/configs/imviz/tests/test_orientation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdaviz/configs/imviz/tests/test_orientation.py b/jdaviz/configs/imviz/tests/test_orientation.py index 8a0b3a32aa..c580ff5b74 100644 --- a/jdaviz/configs/imviz/tests/test_orientation.py +++ b/jdaviz/configs/imviz/tests/test_orientation.py @@ -177,8 +177,8 @@ def test_delete_orientation_multi_viewer(self): # This would set a different reference to second viewer. viewer_2 = self.imviz.create_image_viewer() self.imviz.app.add_data_to_viewer("imviz-1", "has_wcs_1[SCI,1]") - lc_plugin.viewer.selected = "imviz-1" - lc_plugin.orientation.selected = "North-up, East-left" + lc_plugin.viewer = "imviz-1" + lc_plugin.orientation = "North-up, East-left" self.imviz.app.vue_data_item_remove({"item_name": "North-up, East-left"})