SpectralExtraction2D#
- class jdaviz.configs.specviz2d.plugins.spectral_extraction.spectral_extraction.SpectralExtraction2D(*args, **kwargs)[source]#
Bases:
PluginTemplateMixinThe Spectral Extraction 2D plugin exposes specreduce methods for tracing, background subtraction, and spectral extraction from 2D spectra. See the 2D Spectral Extraction Plugin Documentation for more details.
Only the following attributes and methods are available through the public plugin API:
interactive_extractWhether to automatically extract when parameters change.trace_dataset(SelectPluginComponent) controls the input dataset for generating the trace.trace_type(SelectPluginComponent) controls the type of trace to be generated.trace_peak_method(SelectPluginComponent) only applicable iftrace_typeis notFlat.trace_pixelpixel of the trace. Iftrace_typeis notFlat, then this is the “guess” for the automated trace.trace_do_binningonly applicable iftrace_typeis notFlat. Bin the input data when fitting the trace.trace_binsonly applicable iftrace_typeis notFlatandtrace_do_binning.trace_orderorder of the polynomial fit for the trace.trace_offsetoffset to apply to the trace.trace_trace(SelectPluginComponent) existing trace to use as a reference.trace_windowfull width of the trace.bg_dataset(DatasetSelect): controls the input dataset for generating the background.bg_type(SelectPluginComponent): controls the type of background to be generated.bg_trace(SelectPluginComponent) existing trace to use as a reference for the background.bg_trace_pixelonly applicable ifbg_typeis set toManualbg_separationonly applicable ifbg_typeset set toOneSidedorTwoSided. Separation from the referenced trace for the center of each of the background window(s).bg_widthfull width of each background window(s).bg_statistic(SelectPluginComponent) statistic to use when computing the background. ‘Average’ will account for partial pixel weights, ‘Median’ will include all partial pixels.bg_add_results(AddResults)bg_sub_add_resultsext_dataset(DatasetSelect): controls the input dataset for generating the extracted spectrum. “From Plugin” will use the background-subtracted image as defined by the background options above. To skip background extraction, select the original input 2D spectrum.ext_trace(DatasetSelect)ext_type(SelectPluginComponent)ext_widthfull width of the extraction window.horne_ext_profile(SelectPluginComponent) For Horne extract, choice of ‘Gaussian’ or ‘Self (interpolated)’ to use empirical profile from data.self_prof_n_binsNumber of bins to use when computing the self-derived profile for Horne Extract.self_prof_interp_degree_xInterpolation degree (in X) to use when computing the self-derived profile for Horne Extract.self_prof_interp_degree_yInterpolation degree (in Y) to use when computing the self-derived profile for Horne Extract.ext_add_results(AddResults)
Public constructor
Attributes Summary
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
Mixin to handle empty floating point field.
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A boolean (True, False) trait.
An instance of a Python list.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A boolean (True, False) trait.
An instance of a Python list.
Mixin to handle empty floating point field.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
Mixin to handle empty floating point field.
A boolean (True, False) trait.
An instance of a Python list.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
A boolean (True, False) trait.
Mixin to handle empty floating point field.
An instance of a Python list.
A trait for unicode strings.
A boolean (True, False) trait.
Access the marks created by this plugin in both the spectrum-viewer and spectrum-2d-viewer.
Mixin to handle empty integer field.
Mixin to handle empty integer field.
Mixin to handle empty integer field.
An instance of a Python list.
A trait for unicode strings.
Mixin to handle empty integer field.
An instance of a Python list.
A trait for unicode strings.
A boolean (True, False) trait.
Mixin to handle empty integer field.
Mixin to handle empty integer field.
An instance of a Python list.
A trait for unicode strings.
Mixin to handle empty floating point field.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A boolean (True, False) trait.
An instance of a Python list.
A trait for unicode strings.
An instance of a Python list.
A trait for unicode strings.
Mixin to handle empty integer field.
A boolean (True, False) trait.
Methods Summary
export_bg(**kwargs)Create a specreduce Background object from the input parameters defined in the plugin.
export_bg_img([add_data])Create a background 2D spectrum from the input parameters defined in the plugin.
export_bg_spectrum([add_data])Create a background 1D spectrum from the input parameters defined in the plugin.
export_bg_sub([add_data])Create a background-subtracted 2D spectrum from the input parameters defined in the plugin.
export_extract(**kwargs)Create a specreduce extraction object from the input parameters defined in the plugin.
export_extract_spectrum([add_data])Create an extracted 1D spectrum from the input parameters defined in the plugin.
export_trace([add_data])Create a specreduce Trace object from the input parameters defined in the plugin.
import_bg(bg)Import the input parameters from an existing specreduce Background object into the plugin.
import_extract(ext)Import the input parameters from an existing specreduce extract object into the plugin.
import_trace(trace)Import the input parameters from an existing specreduce Trace object into the plugin.
marks_info([include_mark_obj])A dictionary containing each marker name, the viewer(s) (2d/1d spectral) it belongs in, which step (bg, trace, extract) and plotting style kwargs.
update_marks([step])Manually update the live-preview marks for a given step in spectral extraction.
vue_create_bg_img(*args)vue_create_bg_spec(*args)vue_create_bg_sub(*args)vue_create_trace(*args)vue_extract_spectrum(*args)Attributes Documentation
- active_step#
A trait for unicode strings.
- bg_add_to_viewer_items#
An instance of a Python list.
- bg_add_to_viewer_selected#
A trait for unicode strings.
- bg_dataset_items#
An instance of a Python list.
- bg_dataset_selected#
A trait for unicode strings.
- bg_img_spinner#
A boolean (True, False) trait.
- bg_results_label#
A trait for unicode strings.
- bg_results_label_auto#
A boolean (True, False) trait.
- bg_results_label_default#
A trait for unicode strings.
- bg_results_label_invalid_msg#
A trait for unicode strings.
- bg_results_label_overwrite#
A boolean (True, False) trait.
- bg_separation#
Mixin to handle empty floating point field.
- 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_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_statistic_items#
An instance of a Python list.
- bg_statistic_selected#
A trait for unicode strings.
- bg_sub_add_to_viewer_items#
An instance of a Python list.
- bg_sub_add_to_viewer_selected#
A trait for unicode strings.
- bg_sub_results_label#
A trait for unicode strings.
- bg_sub_results_label_auto#
A boolean (True, False) trait.
- bg_sub_results_label_default#
A trait for unicode strings.
- bg_sub_results_label_invalid_msg#
A trait for unicode strings.
- bg_sub_results_label_overwrite#
A boolean (True, False) trait.
- bg_sub_spinner#
A boolean (True, False) trait.
- bg_trace_items#
An instance of a Python list.
- bg_trace_pixel#
Mixin to handle empty floating point field.
- bg_trace_selected#
A trait for unicode strings.
- bg_type_items#
An instance of a Python list.
- bg_type_selected#
A trait for unicode strings.
- bg_width#
Mixin to handle empty floating point field.
- dialog#
A boolean (True, False) trait.
- ext_add_to_viewer_items#
An instance of a Python list.
- ext_add_to_viewer_selected#
A trait for unicode strings.
- ext_dataset_items#
An instance of a Python list.
- ext_dataset_selected#
A trait for unicode strings.
- ext_results_label#
A trait for unicode strings.
- ext_results_label_auto#
A boolean (True, False) trait.
- ext_results_label_default#
A trait for unicode strings.
- ext_results_label_invalid_msg#
A trait for unicode strings.
- ext_results_label_overwrite#
A boolean (True, False) trait.
- ext_specreduce_err#
A trait for unicode strings.
- ext_trace_items#
An instance of a Python list.
- ext_trace_selected#
A trait for unicode strings.
- ext_type_items#
An instance of a Python list.
- ext_type_selected#
A trait for unicode strings.
- ext_uncert_warn#
A boolean (True, False) trait.
- ext_width#
Mixin to handle empty floating point field.
- horne_ext_profile_items#
An instance of a Python list.
- horne_ext_profile_selected#
A trait for unicode strings.
- interactive_extract#
A boolean (True, False) trait.
- marks#
Access the marks created by this plugin in both the spectrum-viewer and spectrum-2d-viewer.
- marks_viewers1d#
- marks_viewers2d#
- self_prof_interp_degree_x#
Mixin to handle empty integer field.
- self_prof_interp_degree_y#
Mixin to handle empty integer field.
- self_prof_n_bins#
Mixin to handle empty integer field.
- template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/3978/lib/python3.11/site-packages/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py', 'spectral_extraction.vue')#
- trace_add_to_viewer_items#
An instance of a Python list.
- trace_add_to_viewer_selected#
A trait for unicode strings.
- trace_bins#
Mixin to handle empty integer field.
- trace_dataset_items#
An instance of a Python list.
- trace_dataset_selected#
A trait for unicode strings.
- trace_do_binning#
A boolean (True, False) trait.
- trace_offset#
Mixin to handle empty integer field.
- trace_order#
Mixin to handle empty integer field.
- trace_peak_method_items#
An instance of a Python list.
- trace_peak_method_selected#
A trait for unicode strings.
- trace_pixel#
Mixin to handle empty floating point field.
- trace_results_label#
A trait for unicode strings.
- trace_results_label_auto#
A boolean (True, False) trait.
- trace_results_label_default#
A trait for unicode strings.
- trace_results_label_invalid_msg#
A trait for unicode strings.
- trace_results_label_overwrite#
A boolean (True, False) trait.
- trace_spinner#
A boolean (True, False) trait.
- trace_trace_items#
An instance of a Python list.
- trace_trace_selected#
A trait for unicode strings.
- trace_type_items#
An instance of a Python list.
- trace_type_selected#
A trait for unicode strings.
- trace_window#
Mixin to handle empty integer field.
- user_api#
- uses_active_status#
A boolean (True, False) trait.
Methods Documentation
- export_bg(**kwargs)[source]#
Create a specreduce Background object from the input parameters defined in the plugin.
- export_bg_img(add_data=False, **kwargs)[source]#
Create a background 2D spectrum from the input parameters defined in the plugin.
- Parameters:
- add_databool
Whether to add the resulting image to the application, according to the options defined in the plugin.
- export_bg_spectrum(add_data=False, **kwargs)[source]#
Create a background 1D spectrum from the input parameters defined in the plugin.
- Parameters:
- add_databool
Whether to add the resulting spectrum to the application, according to the options defined in the plugin.
- export_bg_sub(add_data=False, **kwargs)[source]#
Create a background-subtracted 2D spectrum from the input parameters defined in the plugin.
- Parameters:
- add_databool
Whether to add the resulting image to the application, according to the options defined in the plugin.
- export_extract(**kwargs)[source]#
Create a specreduce extraction object from the input parameters defined in the plugin.
- export_extract_spectrum(add_data=False, **kwargs)[source]#
Create an extracted 1D spectrum from the input parameters defined in the plugin.
- Parameters:
- add_databool
Whether to add the resulting spectrum to the application, according to the options defined in the plugin.
- export_trace(add_data=False, **kwargs)[source]#
Create a specreduce Trace object from the input parameters defined in the plugin.
- Parameters:
- add_databool
Whether to add the resulting trace to the application, according to the options defined in the plugin.
- import_bg(bg)[source]#
Import the input parameters from an existing specreduce Background object into the plugin.
- Parameters:
- bgspecreduce.background.Background
Background object to import
- import_extract(ext)[source]#
Import the input parameters from an existing specreduce extract object into the plugin.
- Parameters:
- extspecreduce.extract.BoxcarExtract
Extract object to import
- import_trace(trace)[source]#
Import the input parameters from an existing specreduce Trace object into the plugin.
- Parameters:
- tracespecreduce.tracing.Trace
Trace object to import
- marks_info(include_mark_obj=True)[source]#
A dictionary containing each marker name, the viewer(s) (2d/1d spectral) it belongs in, which step (bg, trace, extract) and plotting style kwargs.