jesterTOV.eos.base.Interpolate_EOS_model#

class Interpolate_EOS_model[source]#

Bases: ABC

Base class for interpolating equation of state (EOS) data.

This class provides the fundamental interpolation framework for converting tabulated EOS data (density, pressure, energy) into the auxiliary quantities needed for neutron star structure calculations using the TOV equations.

All EOS parametrizations must implement: - construct_eos(): Build EOSData from parameter dictionary - get_required_parameters(): Return list of parameter names

__init__()[source]#

Methods

__init__()

construct_eos(params)

Construct EOS from parameter dictionary.

get_required_parameters()

Return list of parameter names needed for this EOS.

interpolate_eos(n, p, e)

Convert physical EOS quantities to geometric units and compute auxiliary quantities.

abstractmethod construct_eos(params)[source]#

Construct EOS from parameter dictionary.

This is the θ_EOS → EOS mapping that was previously in transforms. Each EOS parametrization knows how to build itself from parameters.

The returned EOSData can include extra_constraints for EOS-specific validation (e.g., spectral decomposition gamma bound violations).

Parameters:

params (dict[str, float]) – Dictionary mapping parameter names to values

Return type:

EOSData

Returns:

EOSData – Complete EOS with all required arrays and optional constraints

abstractmethod get_required_parameters()[source]#

Return list of parameter names needed for this EOS.

Examples

  • MetaModel: [“K_sat”, “Q_sat”, “Z_sat”, “E_sym”, “L_sym”, “K_sym”, “Q_sym”, “Z_sym”]

  • MetaModelCSE: NEP + [“nbreak”] + CSE grid parameters

  • Spectral: [“gamma_0”, “gamma_1”, “gamma_2”, “gamma_3”]

Return type:

list[str]

Returns:

list[str] – Parameter names required by this EOS

interpolate_eos(n, p, e)[source]#

Convert physical EOS quantities to geometric units and compute auxiliary quantities.

This method transforms the input EOS data from nuclear physics units to geometric units used in general relativity calculations, and computes derived quantities needed for the TOV equations.

Parameters:
  • n (Float[Array, n_points]) – Number densities [\(\mathrm{fm}^{-3}\)]

  • p (Float[Array, n_points]) – Pressure values [\(\mathrm{MeV} \, \mathrm{fm}^{-3}\)]

  • e (Float[Array, n_points]) – Energy densities [\(\mathrm{MeV} \, \mathrm{fm}^{-3}\)]

Returns:

tuple

A tuple containing (all in geometric units):

  • ns: Number densities

  • ps: Pressures

  • hs: Specific enthalpy \(h = \int \frac{dp}{\varepsilon + p}\)

  • es: Energy densities

  • dloge_dlogps: Logarithmic derivative \(\frac{d\ln\varepsilon}{d\ln p}\)