From 8f5cf54beb679b0a88b94cd9044af9af706dcc2b Mon Sep 17 00:00:00 2001 From: Clare Shanahan Date: Thu, 15 Aug 2024 10:42:34 -0400 Subject: [PATCH] add args --- .../plugins/spectral_extraction/spectral_extraction.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py index 62b9d6c93c..47211327dc 100644 --- a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py +++ b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py @@ -317,17 +317,19 @@ def _update_mark_scale(self, *args): def _on_gloabl_display_unit_changed(self, msg={}): - if msg.axis == 'spectral_y': self.spectrum_y_units = str(msg.unit) + # a 'flux' and 'sb' message should be recieved back to back from + # the unit conversion plugin, so don't need to sync them immediatley + # within each message recieved if msg.axis == 'flux': self.flux_unit = str(msg.unit) if msg.axis == 'sb': self.sb_unit = str(msg.unit) @observe('function_selected') - def _update_units_on_function_selection(self): + def _update_units_on_function_selection(self, *args): if self.function_selected.lower() == 'sum': self.results_units = self.flux_unit