sincinterp¶
- sofia_redux.toolkit.interpolate.interpolate.sincinterp(x, y, xout, dampfac=3.25, ksize=21, skipsort=False, cval=nan)[source]¶
Perform a sinc interpolation on a data set
- Parameters:
- xarray_like of (int or float)
(shape1,) The independent values of the data
- yarray_like of (int or float)
(shape1,) The dependent values of the data
- xoutarray_like of (int or float) or (int or float)
(shape2,) The new independent values of the data
- dampfacint or float, optional
damping factor for sinc interpolation
- ksizefloat or int, optional
Kernel size used for interpolation. This should be a positive odd integer. If an even value is passed, then the kernel size will be increased by one. Float values will be floored.
- skipsortbool, optional
By default, x and y data are sorted by the x value. This can be a fairly intensive operation, so if you know the data is already sorted, then set
skipsort
to skip sorting. Note, this is dangerous as no error will be reported. Be sure you have a sortedx
before attempting.- cval: float, optional
Value to fill in requested interpolation points outside the data range.
- Returns:
- numpy.ndarray of float
(shape2,) The new dependent values of the data