diff --git a/lcviz/plugins/photometric_extraction/photometric_extraction.py b/lcviz/plugins/photometric_extraction/photometric_extraction.py index 5c84936..235c555 100644 --- a/lcviz/plugins/photometric_extraction/photometric_extraction.py +++ b/lcviz/plugins/photometric_extraction/photometric_extraction.py @@ -59,6 +59,20 @@ def _set_relevant(self, *args): else: self.irrelevant_msg = '' + def _on_global_display_unit_changed(self, msg=None): + if msg is None: + self.flux_units = str(self.app._get_display_unit('flux')) + self.time_units = str(self.app._get_display_unit('time')) + elif msg.axis == 'flux': + self.flux_units = str(msg.unit) + elif msg.axis == 'time': + self.time_units = str(msg.unit) + else: + # ignore + return + # update results_units based on flux_units, sb_units, and currently selected function + self._update_results_units() + @property def slice_display_unit_name(self): return 'time' diff --git a/lcviz/plugins/plot_options/plot_options.py b/lcviz/plugins/plot_options/plot_options.py index 5f79444..ced7acd 100644 --- a/lcviz/plugins/plot_options/plot_options.py +++ b/lcviz/plugins/plot_options/plot_options.py @@ -36,10 +36,6 @@ class PlotOptions(PlotOptions): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - @observe('vdocs') - def _update_docs_link(self, *args): - self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#plot-options" - def not_spatial_subset_in_scatter_viewer(lyr): # note: have to check the classname instead of isinstance to avoid circular import if np.any([isinstance(viewer, CubeView) @@ -51,6 +47,10 @@ def not_spatial_subset_in_scatter_viewer(lyr): self.layer.add_filter(not_spatial_subset_in_scatter_viewer) + @observe('vdocs') + def _update_docs_link(self, *args): + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#plot-options" + def _default_tpf_stretch( self, vmin_percentile=5, vmax_percentile=99, tpf_viewer_reference='image' ):