convolution_smooth

specutils.manipulation.convolution_smooth(spectrum, kernel)[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.

If the spectrum uncertainty exists and is StdDevUncertainty, VarianceUncertainty or InverseVariance then the errors will be propagated through the convolution using a standard propagation of errors. The covariance is not considered, currently.

Parameters
spectrumSpectrum1D

The Spectrum1D object to which the smoothing will be applied.

kernelastropy.convolution.Kernel1D subclass or array.

The convolution based smoothing kernel - anything that astropy.convolution.convolve accepts.

Returns
spectrumSpectrum1D

Output Spectrum1D which is copy of the one passed in with the updated flux.

Raises
ValueError

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