salvus.toolbox.helpers.interpolate
salvus.toolbox.helpers.interpolate salvus toolbox helpers interpolate Interpolation helpers.
Functions
monotonic_cubic_hermite_spline()
monotonic_cubic_hermite_spline()def monotonic_cubic_hermite_spline(
x: npt.NDArray, y: npt.NDArray, xi: npt.NDArray
) -> npt.NDArray: ...Cubic interpolation that preserves monotonicity.
Implements the Fritsch-Carlson method from https://en.wikipedia.org/wiki/Monotone_cubic_interpolation.
Parameters
xnpt.NDArray — X location of spline anchor points.ynpt.NDArray — Y values of spline anchor points.xinpt.NDArray — X values to interpolate at.
Returns npt.NDArray — The interpolated values at xi.