jesterTOV.inference.likelihoods.constraints.ConstraintEOSLikelihood#
- class ConstraintEOSLikelihood(
- penalty_causality=-10000000000.0,
- penalty_stability=-10000000000.0,
- penalty_pressure=-10000000000.0,
Bases:
LikelihoodBaseEOS-level constraint likelihood for enforcing physical validity.
This likelihood only checks EOS-level constraints (causality, stability, pressure). It does NOT check TOV integration results, allowing JAX to optimize away the TOV solve when only EOS constraints are needed (much faster for chiEFT, etc).
The transform must add EOS violation counts to its output dictionary: - ‘n_causality_violations’: Number of cs^2 > 1 points - ‘n_stability_violations’: Number of cs^2 < 0 points - ‘n_pressure_violations’: Number of non-monotonic pressure points
- Parameters:
penalty_causality (float, optional) – Log likelihood penalty for causality violation (default: -1e10)
penalty_stability (float, optional) – Log likelihood penalty for thermodynamic instability (default: -1e10)
penalty_pressure (float, optional) – Log likelihood penalty for non-monotonic pressure (default: -1e10)
Examples
>>> # In config.yaml (chiEFT example - no TOV solve needed) >>> likelihoods: >>> - type: "constraints_eos" >>> enabled: true >>> parameters: >>> penalty_causality: -1.0e10 >>> penalty_stability: -1.0e10
- __init__(
- penalty_causality=-10000000000.0,
- penalty_stability=-10000000000.0,
- penalty_pressure=-10000000000.0,
Methods
Attributes
dataThe data for the likelihood.
modelThe model for the likelihood.