excise_regions¶
-
specutils.manipulation.excise_regions(spectrum, regions, exciser=<function true_exciser at 0x7fa561d8b170>)[source]¶ Method to remove or replace the flux in the defined regions of the spectrum depending on the function provided in the
exciserargument.- Parameters
- spectrum
Spectrum1D The
Spectrum1Dobject to which the excision will be applied.- regionslist of
SpectralRegion Each element of the list is a
SpectralRegion. The flux between the lower and upper spectral axis value of each region will be “cut out” and optionally replaced with interpolated values using theexcisermethod. Note that non-overlapping regions should be provided as separateSpectralRegionobjects in this list, not as sub-regions in a single object in the list.- exciserfunction
Method that takes the spectrum and region and does the excising. Other methods could be defined and used by this routine. default: true_exciser
- spectrum
- Returns
- spectrum
Spectrum1D Output
Spectrum1Dwhich has the regions excised.
- spectrum
- Raises
- ValueError
In the case that
spectrumandregionsare not the correct types.