extract

specviz.analysis.extract(data, x_range)[source] [edit on github]

Extract a region from a spectrum.

Parameters:

data : specutils.core.generic.Spectrum1DRef

Contains the spectrum to be extracted.

x_range : tuple

A spectral coordinate range as in (wave1, wave2).

Returns:

result : specutils.core.generic.Spectrum1DRef

Spectrum data with extracted region.

Examples

>>> d = Spectrum1DRef(...)
>>> d2 = extract(d, (10000, 20000))