Likelihood function definition module
Functions to define Likelihood functions from Astro observation and nuclear experiments
- InferenceWorkflow.Likelihood.Jliklihood(theta, J_low, J_up)[source]
Computing likelihood from a hard cut constraint of J.
- Parameters:
theta (array) – An array representing the parameters used to determine a RMF model in the
case (Lagrangian. In this)
parameters. (the RMF model is defined by 7)
K_low (float) – lower bound of this J constraint.
K_up (float) – upper bound of this J constraint.
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.Kliklihood(theta, K_low, K_up)[source]
Computing likelihood from a hard cut constraint of K.
- Parameters:
theta (array) – An array representing the parameters used to determine a RMF model in the
case (Lagrangian. In this)
parameters. (the RMF model is defined by 7)
K_low (float) – lower bound of this K constraint.
K_up (float) – upper bound of this K constraint.
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.Lliklihood(theta, L_low, L_up)[source]
Computing likelihood from a hard cut constraint of L.
- Parameters:
theta (array) – An array representing the parameters used to determine a RMF model in the
case (Lagrangian. In this)
parameters. (the RMF model is defined by 7)
K_low (float) – lower bound of this L constraint.
K_up (float) – upper bound of this L constraint.
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.MRlikihood_Gaussian(eps_total, pres_total, x, d1)[source]
Computing likelihood from a simulation gaussian distribution of MR measurement
- Parameters:
eps_total (array) – the energy density of full EoS in MeV/fm3, times a G/c**2 factor
pres_total (array) – the pressure from full EoS model in MeV/fm3, times a G/c**4 factor
x (float array) – [Mvalue, Rvalue, Mwidth, Rwidth], Mvalue is the Mass center value of this
measurement (this Mass)
it (Rvalue is the Radius center of)
of (Mwidth is the 1-sigma width)
measurement
measurement. (Rwidth is the 1-sigma width of this radius)
d1 (float) – the sampled density of this measurement
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.MRlikihood_kernel(eps_total, pres_total, x, d1)[source]
Computing likelihood from a distribution of MR measurement
- Parameters:
eps_total (array) – the energy density of full EoS in MeV/fm3, times a G/c**2 factor
pres_total (array) – the pressure from full EoS model in MeV/fm3, times a G/c**4 factor
x (kde.kernel) – the distribution kernel of MR measurement.
d1 (float) – the sampled density of this measurement
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.Masslikihood_Gaussian(eps_total, pres_total, x, d1)[source]
Computing likelihood from a simulation gaussian distribution of Mass measurement
- Parameters:
eps_total (array) – the energy density of full EoS in MeV/fm3, times a G/c**2 factor
pres_total (array) – the pressure from full EoS model in MeV/fm3, times a G/c**4 factor
x (float array) – [Mvalue, Mwidth], Mvalue is the Mass center value of this
measurement (simulated)
measurement. (Mwidth is the 1-sigma width of this Mass)
d1 (float) – the sampled density of this measurement
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.TidalLikihood_kernel(eps_total, pres_total, x, d1)[source]
Computing likelihood from a distribution of Gravitational wave measurement
- Parameters:
eps_total (array) – the energy density of full EoS in MeV/fm3, times a G/c**2 factor
pres_total (array) – the pressure from full EoS model in MeV/fm3, times a G/c**4 factor
x (kde.kernel) – containing kernelGW and chirp, kernelGW is the distribution kde.kernel
measurement (sampled from full GW)
mass (in [chrip)
M2/M1
M1 (tidal of)
sequence. (tidal of M2])
solely. (chrip mass is the sampling from chrip mass term in GW events)
d1 (float) – the sampled density of this measurement
- Returns:
likelihood feed back for this given paramter set-up.
- Return type:
likelihood (float)
- InferenceWorkflow.Likelihood.chiEFT_PNM(EoS_PNM, type='Gaussian', contraint_quantity='e', enlargement=0)[source]
Authors: João Cartaxo, Tuhin Malik, Constança Providência
Calculate the log-likelihood for the equation of state (EoS) of pure neutron matter using chiEFT data extracted from chiral effective field theory. This can be achieved by assigning constants to the energy per neutron ( E/N ) or the pressure ( p ), utilizing either a Gaussian or Super-Gaussian likelihood model.
- Parameters:
EoS_PNM (np.ndarray) – Array with PNM equation of state data, where: - EoS_PNM[0] is the density in fm^-3, - EoS_PNM[1] is the energy density MeV.fm^-3. - EoS_PNM[2] is the pressure in MeV.fm^-3.
type (str, optional) – Specifies the type of distribution to use for the likelihood function. - “Gaussian” (default) or “Super Gaussian”.
contraint_quantity (str, optional) – Specifies which quantity (energy or pressure) to use for the log-likelihood calculation. - “e” for energy, “p” for pressure. The default is “e”.
enlargement (float, optional) – Enlargement factor (as a percentage in decimal form) for the Super-Gaussian distribution, e.g., 0.05 for 5%. Only applicable if type=”Super Gaussian”.
- Returns:
log_likelihood (float)
The sum of log-likelihoods over constraint on number density 0.08, 0.12 and 0.16 fm^-3.
Explanation
———–
- The likelihood calculation –
“Gaussian”: Uses a standard Gaussian log-likelihood based on the discrepancy between EoS data and constraints.
”Super Gaussian”: Employs an adjusted likelihood featuring a flattened peak of the Gaussian distribution.
Data Sources
————
- Energy per neutron constraints are taken from (Huth et al., Nature, vol 606, pp 276–280 (2022).)
- Pressure constraints are taken from (K. Hebeler et al., ApJ 773, 11 (2013).)
- InferenceWorkflow.Likelihood.ln_pQCD(EOS, rho_list=[0.92], points=1000)[source]
Calculates the log-likelihood for the beta-equilibrium equation of state (EoS) using pQCD data.
- Parameters:
EoS (np.ndarray) – Array with beta-equilibrium equation of state data, where: - EoS[0] is the density in fm^-3, - EoS[1] is the energy density GeV.fm^-3. - EoS[2] is the pressure in GeV.fm^-3.
rho_list (list, optional) – Specifies at which number densities (in fm^-3) to compute the pQCD contraint at.
points (int, optional) – Number of points used to compute the weight, a higher number allows for greater precisions.
- Returns:
log_mean – The averaged sum of log-likelihoods over the number densities specified by rho_list.
- Return type:
float
References
Komoltsev and Kurkela (2021), Gorda et al. (2022), and Gorda et al. Phys. Rev. Lett. 127, 162003 (2021).