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.medfiltfunction.- Parameters
- spectrum
Spectrum1D The
Spectrum1Dobject to which the smoothing will be applied.- widthnumber
The width of the median filter in pixels.
- spectrum
- Returns
- spectrum
Spectrum1D Output
Spectrum1Dwhich is copy of the one passed in with the updated flux.
- spectrum
- Raises
- ValueError
In the case that
spectrumorwidthare not the correct type or value.