Skip to content

Commit

Permalink
disallow gaussian smooth output as input
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jun 6, 2023
1 parent 7ffaa26 commit d2e0d01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Specviz2d
Other Changes and Additions
---------------------------

- Gaussian smooth plugin excludes results from the gaussian smooth plugin from the input
dataset dropdown. [#2239]

3.5.1 (unreleased)
==================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def __init__(self, *args, **kwargs):
self.dataset._viewers = [self._default_spectrum_viewer_reference_name]
self.dataset._clear_cache()

self.dataset.add_filter('not_from_this_plugin')

self.mode = SelectPluginComponent(self,
items='mode_items',
selected='mode_selected',
Expand Down
3 changes: 3 additions & 0 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,9 @@ def _is_valid_item(self, data):
def not_from_plugin(data):
return data.meta.get('Plugin', None) is None

def not_from_this_plugin(data):
return data.meta.get('Plugin', None) != self.plugin.__class__.__name__

def not_from_plugin_model_fitting(data):
return data.meta.get('Plugin', None) != 'ModelFitting'

Expand Down

0 comments on commit d2e0d01

Please # to comment.