median_smooth¶
- specutils.manipulation.median_smooth(spectrum, width)[source]¶
Smoothing based on a median filter. The median filter smoothing is implemented using the
scipy.signal.medfilt
function.- Parameters:
- spectrum
Spectrum1D
The
Spectrum1D
object to which the smoothing will be applied.- widthnumber
The width of the median filter in pixels.
- spectrum
- Returns:
- spectrum
Spectrum1D
Output
Spectrum1D
which is copy of the one passed in with the updated flux.
- spectrum
- Raises:
- ValueError
In the case that
spectrum
orwidth
are not the correct type or value.