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 31 32 | |
pchip_interpolator(x, y)
Monotone shape-preserving PCHIP interpolant.
Source code in src/cds2/interpolate.py
35 36 37 | |
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
40 41 42 43 44 45 46 47 48 | |
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
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
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
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
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
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |