InterpolatedUnivariateSpline
Not surprisingly, the function
interp1d
is just one of many spline functions and classes, one-dimensional (univariate) and multidimensional (multivariate) interpolation classes, and Lagrange, Taylor, and Pade polynomial interpolators. For a comprehensive list, see the
scipy.interpolate reference manual.
Two of these might be of particular interest to you in the analysis of 1D data:
- UnivariateSpline, which constructs a 1D smoothing spline of degree k to the provided x,y data
- InterpolatedUnivariateSpline, which constructs a 1D spline that passes through all data points
Their advantages include
- the ability to construct a new spline representing the derivative of the original spline
- the ability to construct a new spline representing an integral of the original spline
- and for 3rd order splines, the ability to find the roots (zero crossings) of the spline
Note: these 'object-oriented' interpolating functions are technically what Python calls classes rather than functions. For us that just means there are a few differences in syntax and usage we will need to pay attention to, but in exchange, we get a much more powerful interpolation routine.