smoothres

sofia_redux.spectroscopy.smoothres.smoothres(x, y, resolution, siglim=5)[source]

Smooth a data to a constant resolution

The procedure is:

  1. Resample data to a constant spacing in log(wavelength).

  2. Convolve resampled data with Gaussian kernel.

  3. 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.