smoothres¶
- sofia_redux.spectroscopy.smoothres.smoothres(x, y, resolution, siglim=5)[source]¶
Smooth a data to a constant resolution
The procedure is:
Resample data to a constant spacing in log(wavelength).
Convolve resampled data with Gaussian kernel.
Interpolate back to linear wavelength spacing.
- Parameters:
- xarray_like of (int or float)
(N,) independent variable
- yarray_like if (int or float)
(N,) dependent variable
- resolutionint or float
Spectral resolution to smooth to
- siglimint or float, optional
Maximum fwhm deviation
- Returns:
- numpy.ndarray
(N,) The smoothed data array.