SpectralSubsetSelect
- class jdaviz.core.template_mixin.SpectralSubsetSelect(plugin, items, selected, selected_has_subregions=None)[source] [edit on github]
Bases:
jdaviz.core.template_mixin.BasePluginComponentTraitlets (in the object, custom traitlets in the plugin):
items(list of dicts with keys: label, color)selected(string)selected_has_subregions(bool, OPTIONAL)
Properties (in the object only):
labels(list of labels corresponding to items)selected_obj(subset object corresponding to selected, cached)
Methods (in the object only):
selected_min(cube)(float)selected_max(cube)(float)
To use in a plugin:
create traitlets with default values
register with all the automatic logic in the plugin’s init by passing the string names of the respective traitlets.
use component in plugin template (see below)
refer to properties above based on the interally stored reference to the instantiated object of this component
Example template (label and hint are optional):
<plugin-subset-select :items="spectral_subset_items" :selected.sync="spectral_subset_selected" label="Spectral region" hint="Select spectral region." />
Attributes Summary
Methods Summary
selected_max(spectrum1d)selected_min(spectrum1d)Attributes Documentation
- labels
- selected_obj
Methods Documentation
- selected_max(spectrum1d)[source] [edit on github]
- selected_min(spectrum1d)[source] [edit on github]