cds2.interpolate
Interpolation on scipy.interpolate.
Interpolation — convenience re-export of scipy.interpolate / numpy.interp.
linear_interp(x_new, x_known, y_known)
Piecewise-linear interpolation at x_new through known points.
Source code in src/cds2/interpolate.py
21 22 23 24 25 | |
cubic_spline(x, y)
Natural cubic spline interpolant callable on any point in range.
Source code in src/cds2/interpolate.py
28 29 30 | |
pchip_interpolator(x, y)
Monotone shape-preserving PCHIP interpolant.
Source code in src/cds2/interpolate.py
33 34 35 | |
lagrange_poly(x, y)
Lagrange polynomial passing exactly through all given points.
Uses :class:scipy.interpolate.BarycentricInterpolator — the
recommended replacement for the deprecated :func:scipy.interpolate.lagrange
(removed in SciPy 1.20). The returned interpolator is callable and
evaluates the unique interpolating polynomial at any point.
Source code in src/cds2/interpolate.py
38 39 40 41 42 43 44 45 46 | |
grid_interp(points, values, query_points, method='linear')
Interpolate values defined at scattered N-D points onto new locations.
Source code in src/cds2/interpolate.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
regular_grid_interp(grid_axes, values, query_points)
Interpolate on a regular (rectilinear) grid built from axis vectors.
Source code in src/cds2/interpolate.py
65 66 67 68 69 70 71 72 73 74 75 76 | |
rbf_interp(points, values, query_points, kernel='thin_plate_spline', smoothing=0.0, neighbors=None)
Radial-basis-function interpolation for scattered N-D data.
neighbors (kNN subset per query) keeps large problems tractable at a
small accuracy cost; smoothing > 0 fits an approximating surface
instead of passing through the data.
Source code in src/cds2/interpolate.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |