SpectralSubsetSelectMixin

class jdaviz.core.template_mixin.SpectralSubsetSelectMixin(**kwargs)[source] [edit on github]

Bases: ipyvuetify.VuetifyTemplate.VuetifyTemplate, glue.core.hub.HubListener

Applies the SpectralSubsetSelect component as a mixin in the base plugin. This automatically adds traitlets as well as new properties to the plugin with minimal extra code. For multiple instances or custom traitlet names/defaults, use the SpectralSubsetSelect component instead.

Traitlets (available from the plugin):

  • spectral_subset_items

  • spectral_subset_selected

  • spectral_subset_selected_has_subregions

Properties (available from the plugin):

  • spectral_subset.labels

  • spectral_subset.selected_obj

Methods (available from the plugin):

  • spectral_subset.selected_min

  • spectral_subset.selected_max

To use in a plugin:

  • add SpectralSubsetSelectMixin as a mixin to the class

  • use the traitlets and properties above as needed (note the prefix for properties)

Example template (label and hint are optional):

<v-row>
  <plugin-subset-select
    :items="spectral_subset_items"
    :selected.sync="spectral_subset_selected"
    label="Spectral region"
    hint="Select spectral region."
  />
</v-row>

Public constructor

Attributes Summary

spectral_subset_items

An instance of a Python list.

spectral_subset_selected

A trait for unicode strings.

spectral_subset_selected_has_subregions

A boolean (True, False) trait.

Attributes Documentation

spectral_subset_items

An instance of a Python list.

spectral_subset_selected

A trait for unicode strings.

spectral_subset_selected_has_subregions

A boolean (True, False) trait.