SpectralExtraction#

class jdaviz.configs.cubeviz.plugins.spectral_extraction.spectral_extraction.SpectralExtraction(*args, **kwargs)[source]#

Bases: PluginTemplateMixin, ApertureSubsetSelectMixin, DatasetSelectMixin, AddResultsMixin

See the Spectral Extraction Plugin Documentation for more details.

Only the following attributes and methods are available through the public plugin API:

  • show()

  • open_in_tray()

  • close_in_tray()

  • aperture (ApertureSubsetSelect): Subset to use for the spectral extraction, or Entire Cube.

  • wavelength_dependent: Whether the aperture should be considered wavelength-dependent. The cone is defined to intersect aperture at reference_spectral_value.

  • reference_spectral_value: The wavelength that will be used to calculate the radius of the cone through the cube.

  • background (ApertureSubsetSelect): Subset to use for background subtraction, or None.

  • bg_wavelength_dependent: Whether the background aperture should be considered wavelength-dependent (requires wavelength_dependent to also be set to True). The cone is defined to intersect background at reference_spectral_value.

  • `bg_spec_per_spaxel:

    Whether to normalize the background per spaxel when calling extract_bg_spectrum. Otherwise, the spectrum will be scaled by the ratio between the areas of the aperture and the background aperture. Only applicable if function is ‘Sum’.

  • bg_spec_add_results (AddResults)

  • extract_bg_spectrum()

  • aperture_method (SelectPluginComponent): Method to use for extracting spectrum (and background, if applicable).

  • add_results (AddResults)

  • extract()

Public constructor

Attributes Summary

active_step

A trait for unicode strings.

aperture_area_along_spectral

aperture_method_items

An instance of a Python list.

aperture_method_selected

A trait for unicode strings.

aperture_weight_mask

bg_area_along_spectral

bg_export_available

A boolean (True, False) trait.

bg_items

An instance of a Python list.

bg_scale_factor

A float trait.

bg_selected

A trait which allows any value.

bg_selected_validity

An instance of a Python dict.

bg_spec_add_to_viewer_items

An instance of a Python list.

bg_spec_add_to_viewer_selected

A trait for unicode strings.

bg_spec_per_spaxel

A boolean (True, False) trait.

bg_spec_results_label

A trait for unicode strings.

bg_spec_results_label_auto

A boolean (True, False) trait.

bg_spec_results_label_default

A trait for unicode strings.

bg_spec_results_label_invalid_msg

A trait for unicode strings.

bg_spec_results_label_overwrite

A boolean (True, False) trait.

bg_spec_spinner

A boolean (True, False) trait.

bg_wavelength_dependent

A boolean (True, False) trait.

bg_weight_mask

conflicting_aperture_and_function

A boolean (True, False) trait.

conflicting_aperture_error_message

A trait for unicode strings.

cube

do_auto_extraction

export_enabled

A boolean (True, False) trait.

extraction_available

A boolean (True, False) trait.

filename

A trait for unicode strings.

flux_unit

A trait for unicode strings.

function_items

An instance of a Python list.

function_selected

A trait for unicode strings.

live_update_subscriptions

marks

mask_non_science

overwrite_warn

A boolean (True, False) trait.

reference_spectral_value

Mixin to handle empty floating point field.

resulting_product_name

A trait for unicode strings.

results_units

A trait for unicode strings.

sb_unit

A trait for unicode strings.

show_live_preview

A boolean (True, False) trait.

slice_display_unit

slice_display_unit_name

slice_indicator_viewers

slice_plugin

slice_spectral_value

A float trait.

spatial_axes

spectrum_y_units

A trait for unicode strings.

template_file

uncert_cube

user_api

uses_active_status

A boolean (True, False) trait.

wavelength_dependent

A boolean (True, False) trait.

wavelength_dependent_available

A boolean (True, False) trait.

Methods Summary

__call__([add_data])

Call self as a function.

extract(*args, **kwargs)

extract_bg_spectrum(*args, **kwargs)

vue_adopt_slice_as_reference(*args)

vue_create_bg_spec(*args, **kwargs)

vue_goto_reference_spectral_value(*args)

vue_overwrite_fits(*args)

Attempt to force writing the spectral extraction if the user confirms the desire to overwrite.

vue_save_as_fits(*args)

vue_spectral_extraction(*args, **kwargs)

Attributes Documentation

active_step#

A trait for unicode strings.

aperture_area_along_spectral#
aperture_method_items#

An instance of a Python list.

aperture_method_selected#

A trait for unicode strings.

aperture_weight_mask#
bg_area_along_spectral#
bg_export_available#

A boolean (True, False) trait.

bg_items#

An instance of a Python list.

bg_scale_factor#

A float trait.

bg_selected#

A trait which allows any value.

bg_selected_validity#

An instance of a Python dict.

One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.

Changed in version 5.0: Added key_trait for validating dict keys.

Changed in version 5.0: Deprecated ambiguous trait, traits args in favor of value_trait, per_key_traits.

bg_spec_add_to_viewer_items#

An instance of a Python list.

bg_spec_add_to_viewer_selected#

A trait for unicode strings.

bg_spec_per_spaxel#

A boolean (True, False) trait.

bg_spec_results_label#

A trait for unicode strings.

bg_spec_results_label_auto#

A boolean (True, False) trait.

bg_spec_results_label_default#

A trait for unicode strings.

bg_spec_results_label_invalid_msg#

A trait for unicode strings.

bg_spec_results_label_overwrite#

A boolean (True, False) trait.

bg_spec_spinner#

A boolean (True, False) trait.

bg_wavelength_dependent#

A boolean (True, False) trait.

bg_weight_mask#
conflicting_aperture_and_function#

A boolean (True, False) trait.

conflicting_aperture_error_message#

A trait for unicode strings.

cube#
do_auto_extraction = True#
export_enabled#

A boolean (True, False) trait.

extraction_available#

A boolean (True, False) trait.

filename#

A trait for unicode strings.

flux_unit#

A trait for unicode strings.

function_items#

An instance of a Python list.

function_selected#

A trait for unicode strings.

live_update_subscriptions#
marks#
mask_non_science#
overwrite_warn#

A boolean (True, False) trait.

reference_spectral_value#

Mixin to handle empty floating point field.

resulting_product_name#

A trait for unicode strings.

results_units#

A trait for unicode strings.

sb_unit#

A trait for unicode strings.

show_live_preview#

A boolean (True, False) trait.

slice_display_unit#
slice_display_unit_name#
slice_indicator_viewers#
slice_plugin#
slice_spectral_value#

A float trait.

spatial_axes#
spectrum_y_units#

A trait for unicode strings.

template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/bmorris3/envs/rampviz-docs-update/lib/python3.11/site-packages/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py', 'spectral_extraction.vue')#
uncert_cube#
user_api#
uses_active_status#

A boolean (True, False) trait.

wavelength_dependent#

A boolean (True, False) trait.

wavelength_dependent_available#

A boolean (True, False) trait.

Methods Documentation

__call__(add_data=True)[source]#

Call self as a function.

extract(*args, **kwargs)#
extract_bg_spectrum(*args, **kwargs)#
vue_adopt_slice_as_reference(*args)[source]#
vue_create_bg_spec(*args, **kwargs)[source]#
vue_goto_reference_spectral_value(*args)[source]#
vue_overwrite_fits(*args)[source]#

Attempt to force writing the spectral extraction if the user confirms the desire to overwrite.

vue_save_as_fits(*args)[source]#
vue_spectral_extraction(*args, **kwargs)[source]#