diff --git a/lcviz/plugins/photometric_extraction/photometric_extraction.py b/lcviz/plugins/photometric_extraction/photometric_extraction.py index 56fea4a..d79925b 100644 --- a/lcviz/plugins/photometric_extraction/photometric_extraction.py +++ b/lcviz/plugins/photometric_extraction/photometric_extraction.py @@ -42,6 +42,7 @@ def __init__(self, *args, **kwargs): def is_tpf(data): return len(data.shape) == 3 self.dataset.add_filter(is_tpf) + self._set_relevant() @property def user_api(self): @@ -49,6 +50,13 @@ def user_api(self): 'add_results', 'extract'] return PluginUserApi(self, expose=expose) + @observe('dataset_items') + def _set_relevant(self, *args): + if len(self.dataset_items) < 1: + self.irrelevant_msg = 'Requires at least one TPF cube to be loaded' + else: + self.irrelevant_msg = '' + @property def marks(self): marks = {} diff --git a/lcviz/plugins/stitch/stitch.py b/lcviz/plugins/stitch/stitch.py index 47bafbf..5664f8a 100644 --- a/lcviz/plugins/stitch/stitch.py +++ b/lcviz/plugins/stitch/stitch.py @@ -45,6 +45,7 @@ def __init__(self, *args, **kwargs): self.dataset.add_filter(data_not_folded, is_not_tpf) self.results_label_default = 'stitched' + self._set_relevant() @property def user_api(self): @@ -52,7 +53,7 @@ def user_api(self): return PluginUserApi(self, expose=expose) @observe('dataset_items') - def _set_relevent(self, *args): + def _set_relevant(self, *args): if len(self.dataset_items) < 2: self.irrelevant_msg = 'Requires at least two datasets loaded into viewers' else: