spectral_slab

specutils.manipulation.spectral_slab(spectrum, lower, upper)[source]

Extract a slab from the input Spectrum1D defined by the lower and upper bounds defined by the region instance. The extracted region will be returned as a new Spectrum1D.

Parameters:
spectrum: `~specutils.Spectrum1D`

The spectrum object from which the region will be extracted.

lower, upper: `~astropy.units.Quantity`

The lower and upper bounds of the region to extract from the original spectrum.

Returns:
spectrum: Spectrum1D or list of Spectrum1D

Excised spectrum, or list of spectra if the input region contained multiple subregions.

Notes

This is for now just a proxy for function extract_region, to ease the transition from spectral-cube.