jesterTOV.inference.likelihoods.constraints.ConstraintTOVLikelihood#
- class ConstraintTOVLikelihood(penalty_tov=-10000000000.0)[source]#
Bases:
LikelihoodBaseTOV-level constraint likelihood for enforcing valid TOV integration.
This likelihood only checks TOV integration results (NaN in M-R-Λ). It does NOT check EOS-level constraints. Use together with ConstraintEOSLikelihood for full constraint checking, or use alone when EOS constraints are already satisfied.
The transform must add TOV violation counts to its output dictionary: - ‘n_tov_failures’: Number of NaN in TOV solution (M, R, Λ)
- Parameters:
penalty_tov (float, optional) – Log likelihood penalty for TOV integration failure (default: -1e10)
Examples
>>> # In config.yaml (full constraint checking) >>> likelihoods: >>> - type: "constraints_eos" >>> enabled: true >>> - type: "constraints_tov" >>> enabled: true >>> parameters: >>> penalty_tov: -1.0e10
Methods
Attributes
dataThe data for the likelihood.
modelThe model for the likelihood.