jesterTOV.utils.cubic_spline

Contents

jesterTOV.utils.cubic_spline#

cubic_spline(xq, xp, fp)[source]#

Cubic spline interpolation using interpax.

This function creates a cubic spline interpolator through the given data points and evaluates it at the query points. Cubic splines provide smooth interpolation with continuous first and second derivatives.

Parameters:
  • xq (Float[Array, "n"]) – Query points for evaluation

  • xp (Float[Array, "n"]) – Known x-coordinates of data points

  • fp (Float[Array, "n"]) – Known y-coordinates, i.e., fp = f(xp)

Returns:

Array – Interpolated values at query points xq

Notes

Uses the interpax library for JAX-compatible spline interpolation. See: f0uriest/interpax