excise_regions

specutils.manipulation.excise_regions(spectrum, regions, exciser=<function linear_exciser at 0x7fe7fef497a0>)[source]

Apply a convolution based smoothing to the spectrum. The kernel must be one of the 1D kernels defined in astropy.convolution.

This method can be used along but also is used by other specific methods below.

Parameters
spectrumSpectrum1D

The Spectrum1D object to which the smoothing will be applied.

regionslist of SpectralRegion

Each element of the list is a SpectralRegion. The flux between these wavelengths will be “cut out” using the exciser method.

exciser: method

Method that takes the spectrum and region and does the excising. Other methods could be defined and used by this routine. default: linear_exciser

Returns
spectrumSpectrum1D

Output Spectrum1D which has the regions excised.

Raises
ValueError

In the case that spectrum and regions are not the correct types.