box_smooth

specutils.manipulation.box_smooth(spectrum, width)[source]

Smooth a Spectrum instance along the spectral axis based on a astropy.convolution.Box1DKernel kernel.

Parameters:
spectrumSpectrum

The spectrum object to which the smoothing will be applied.

widthnumber

The width of the kernel, in pixels, as defined in astropy.convolution.Box1DKernel

Returns:
spectrumSpectrum

Output Spectrum which a copy of the one passed in with the updated flux.

Raises:
ValueError

In the case that width is not the correct type or value.