jesterTOV.inference.likelihoods.constraints.ConstraintGammaLikelihood#
- class ConstraintGammaLikelihood(penalty_gamma=-10000000000.0)[source]#
Bases:
LikelihoodBaseGamma constraint likelihood for spectral decomposition EOS.
This likelihood enforces LALSuite’s requirement that the adiabatic index Γ(x) ∈ [0.6, 4.5] for all dimensionless log-pressures x ∈ [0, xmax]. This constraint is specific to spectral decomposition EOS and ensures physical validity and numerical stability.
The spectral transform must add gamma violation counts to its output dictionary: - ‘n_gamma_violations’: Number of points where Γ(x) violates [0.6, 4.5] bounds
- Parameters:
penalty_gamma (float, optional) – Log likelihood penalty for gamma bound violation (default: -1e10)
Examples
>>> # In config.yaml (spectral EOS examples) >>> likelihoods: >>> - type: "constraints_gamma" >>> enabled: true >>> parameters: >>> penalty_gamma: -1.0e10
Notes
This likelihood is only relevant for spectral decomposition EOS parametrization. For metamodel or metamodel+CSE transforms, this likelihood will return 0.0 (no penalty) since n_gamma_violations will not be present in the transform output.
See also
ConstraintEOSLikelihoodGeneral EOS-level constraints (causality, stability, pressure)
ConstraintTOVLikelihoodTOV integration validity
Methods
Attributes
dataThe data for the likelihood.
modelThe model for the likelihood.