2D Spectral Extraction#
Plugin Availability
This plugin works with 3D spectral cubes.
The plugin will be visible when at least one 3D spectral cube dataset is loaded.
Extract 1D spectra from 2D spectroscopic data.
Description#
The 2D Spectral Extraction plugin extracts 1D spectra from 2D spectroscopic data by summing or averaging across the spatial direction.
Key Features:
Extract 1D from 2D spectra
Configurable extraction aperture
Background subtraction
Trace following
Uncertainty propagation
UI Access#
Control data and subset layer order and visibility for each viewer. Toggle layer visibility, reorder layers by dragging, and manage which data appears in the viewer.
dm = jd.viewers[viewer].data_menu
Click the Spectral Extraction icon in the plugin toolbar to:
Define extraction aperture
Set background regions
Configure extraction parameters
Extract 1D spectrum
API Access#
plg = specviz2d.plugins['Spectral Extraction']
plg.aperture_width = 5 # pixels
plg.extract()
API References#
- The 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)
For detailed API documentation, see SpectralExtraction2D.
See Also#
Data Analysis Plugins - Specviz2d extraction documentation