jesterTOV.utils.interp_in_logspace#
- interp_in_logspace(x, xs, ys)[source]#
Perform logarithmic interpolation.
This function performs interpolation in logarithmic space, which is more appropriate for quantities that span many orders of magnitude (like pressure and density in neutron stars).
The interpolation is performed as:
\[\log y(x) = \text{interp}(\log x, \log x_s, \log y_s)\]- Parameters:
x (float) – Point at which to evaluate the interpolation
xs (Array) – Known x-coordinates (must be positive)
ys (Array) – Known y-coordinates (must be positive)
- Returns:
float – Interpolated value at x
Notes
All input values must be positive since logarithms are taken.