pchip_1d#

exo_skryer.aux_functions.pchip_1d(x: Array, x_nodes: Array, y_nodes: Array) Array[source]#

Piecewise Cubic Hermite Interpolating Polynomial (PCHIP).

Provides a 1D monotonic cubic interpolation. Values outside the node range are clipped to the boundary values.

Parameters:
xndarray

The x-coordinates at which to evaluate the interpolated values. Can be any shape; interpolation is performed element-wise.

x_nodesndarray

1D array of data point x-coordinates, must be sorted in ascending order. Minimum length is 2.

y_nodesndarray

1D array of data point y-coordinates corresponding to x_nodes. Must have the same length as x_nodes.

Returns:
yndarray

The interpolated values at positions x, with the same shape as x. Values are computed using shape-preserving cubic Hermite interpolation. Points outside the range [x_nodes[0], x_nodes[-1]] are clipped to boundary values.