neost package
Subpackages
- neost.eos package
- Submodules
- neost.eos.base module
BaseEoS
BaseEoS.CofE()
BaseEoS.EofP()
BaseEoS.EofRho()
BaseEoS.Mass_Radius()
BaseEoS.PofE()
BaseEoS.SLYfit()
BaseEoS.ceft_band_func()
BaseEoS.edens()
BaseEoS.f_chi_calc()
BaseEoS.find_epsdm_cent()
BaseEoS.find_max_edsc()
BaseEoS.get_BPS()
BaseEoS.get_eos_crust()
BaseEoS.get_minmax_edsc_chirp()
BaseEoS.plot()
BaseEoS.plot_massradius()
BaseEoS.polytropic_func()
BaseEoS.rhodens()
BaseEoS.update()
- neost.eos.polytropes module
- neost.eos.speedofsound module
Submodules
neost.Likelihood module
neost.Prior module
neost.Star module
- class neost.Star.Star(epscent, epscent_dm=0.0, enthalpy=False)[source]
Bases:
object
Instances of this class represent a model neutron star.
- property Mbaryonic
Get the gravitational mass of baryonic component.
- property Mdm
Get the total gravitational dark matter mass.
- property Mdmcore
Get the dark matter mass within the baryonic radius.
- property Mdmhalo
Get the dark matter mass outside the baryonic radius.
- property Mrot
Get the gravitational mass.
- property Rdm
Get the total dark matter radius.
- property Rdm_core
Get the dark matter core radius.
- property Rdm_halo
Get the dark matter halo radius.
- property Req
Get the equatorial radius.
- solve_structure(eps, pres, eps_dm=None, pres_dm=None, dm_halo=False, two_fluid_tidal=False, atol=1e-06, rtol=0.0001, hmax=1000.0, step=0.46)[source]
Solve the relativistic structure equations to build a model star.
- Args:
- param eos (object):
The interpolated EoS object, which inputs a density and outputs a pressure, both in geometrized units.
- param Pmin (float):
The pressure at the surface of the star, or the minimum pressure for which the EoS is defined. Should be given in geometrized units.
- param atol (float):
The absolute tolerance for the ODE solver.
- param rtol (float):
The relative tolerance for the ODE solver.
- param hmax (float):
The maximum step size allowed for the ODE solver, given in centimetres.
- param step (float):
The resolution of the ODE solver, should be between ~0.2 and ~0.5.
neost.PosteriorAnalysis module
- neost.PosteriorAnalysis.compute_auxiliary_data(root_name, EOS, variable_params, static_params, chirp_masses, dm=False)[source]
Function to compute the posterior auxiliary data used to generate standard NEoST plots, such as, the pressures, (if dm = True) the baryonic pressure, mass-radius posteriors, and p-eps posteriors.
Parameters
- root_name: str
Name of the inference run to refer back to. Used to get the Multinest outputs.
- EOS: obj
equation of state object initialized in the inference script, i.e., the parameters that are sampled during inferencing.
- variable_params: dict
Variable parameters in the inference script.
- static_params: dict
Static parameters in the inference script, i.e., the parameters that are held static during inference sampling.
- chirp_masses: list
List determining if GW data is included. If None, just MR only.
- dm: bool
If True, ADM is included when computing the table data.
- neost.PosteriorAnalysis.compute_prior_auxiliary_data(root_name, EOS, variable_params, static_params, dm=False)[source]
Function to compute the prior auxiliary data used to generate standard NEoST plots, such as, the pressures, (if dm = True) the baryonic pressure, and mass-radius priors
Parameters
- root_name: str
Name of the inference run to refer back to. Used to get the Multinest outputs.
- EOS: obj
equation of state object initialized in the inference script, i.e., the parameters that are sampled during inferencing.
- variable_params: dict
Variable parameters in the inference script.
- static_params: dict
Static parameters in the inference script, i.e., the parameters that are held static during inference sampling.
- dm: bool
If True, ADM is included when computing the table data.
- neost.PosteriorAnalysis.compute_table_data(root_name, EOS, variable_params, static_params, dm=False)[source]
Function to compute the table data in Raaijmakers et al. 2021 & Rutherford et al. 2024. In particular: M_TOV, R_TOV, eps_cent_TOV, rho_cent_TOV, P_cent_TOV, R_1.4, eps_cent_1.4, rho_cent_1.4, P_cent_1.4, R_2.0, eps_cent_2.0, rho_cent_2.0, P_cent_2.0. With v2.0.0, the user has the choice to include ADM or not.
Parameters
- root_name: str
Name of the inference run to refer back to. Used to get the Multinest outputs.
- EOS: obj
equation of state object initialized in the inference script, i.e., the parameters that are sampled during inferencing.
- variable_params: dict
Variable parameters in the inference script.
- static_params: dict
Static parameters in the inference script, i.e., the parameters that are held static during inference sampling.
- dm: bool
If True ADM is included when computing the table data.
- neost.PosteriorAnalysis.eos_posterior_plot(root_name, variable_params, prior_contours=None, dm=False)[source]
Function to plot the p-eps posteriors.
Parameters
- root_name: str
Name of the inference run to refer back to. Used to get the Multinest outputs.
- variable_params: dict
Variable parameters in the inference script.
- prior_contours: bool
If True, include the prior contours
- dm: bool
If True, ADM is included in the p-eps posteriors. Otherwise, the baryonic only p-eps is used.
neost.tovsolvers.TOVh module
- neost.tovsolvers.TOVh.h_initial_condition(central_h, central_P, central_e, central_Gamma)
- neost.tovsolvers.TOVh.solveTOVh(rhocent, eos_eps, eos_pres, atol=1e-06, rtol=1e-05, hmax=1000.0, step=0.46)
neost.tovsolvers.TOVr module
- neost.tovsolvers.TOVr.initial_conditions(rhocent, pcent, adindcent=2.0)
Set the initial conditions for solving the structure equations.
- Args:
eos (object): An object that takes energy density as input and outputs pressure, both in geometrized units. w0 (float): The initial value of the rotational drag. Not known a priori, but can be calculated after the TOV equations are solved. j0 (float): The initial value of j. Not known a priori, but can be calculated after the TOV equations are solved. static (bool): Calculate initial conditions for a static star (True) or a rotating star (False).
- Returns:
tuple: tuple containing:
dr (float): The initial stepsize in cm.
intial (array): A np array storing the initial conditions.
- neost.tovsolvers.TOVr.solveTOVr(rhocent, eos_eps, eos_pres, atol, rtol, hmax, step)
neost.tovsolvers.TOVdm module
- neost.tovsolvers.TOVdm.initial_conditions(rhobcent, rhodmcent, pbcent, pdmcent)
Set the initial conditions for solving the structure equations.
- Args:
rhobcent (double): baryonic central density in geometrized units. rhodmcent (double): ADM central density in geometrized units. pbcent (double): baryonic central pressure in geometrized units. pdmcent (double): ADM central pressure in geometrized units.
- Returns:
tuple: tuple containing:
dr (float): The initial stepsize in cm.
intial (array): A np array storing the initial conditions.
- neost.tovsolvers.TOVdm.solveTOVdm(rhobcent, rhodmcent, eos_epsb, eos_presb, eos_epsdm, eos_presdm, dm_halo, two_fluid_tidal, atol, rtol, hmax, step)
neost.tovsolvers.TidalDef module
- neost.tovsolvers.TidalDef.solveTidal(Array, dm_halo)[source]
Function that solves the two-fluid tidal deformability equations.
Parameters
- Array: array
Output array that has the full TOVdm.pyx solver’s radial, mass and pressure distributions of baryonic matter and ADM, respectively. The units are geometrized.
- dm_halo: bool
If True, ADM halos will be considered in the two-fluid tidal deformability calculation.
Methods
- dp_deps(eps,deps,epsgrid,presgrid)
Numerical derivative calculator of the derivative of pressure w.r.t energy density
- dalpha_dr(r)
The dalpha_dr term in the TOV equations, which is related to the g_tt component of the spherically symmetric static metric.
- g_rr(r)
g_rr component of the spherically symmetric static metric.
- dy_dr(r,y)
yR = y(R) is related to the quadrupolar perturbed metric function and is obtained as a solution to the differential equation dy_dr
- tidal_deformability(y2, Mns, Rns)
Two-fluid deformability calculation function.
neost.utils module
Module contents
NEoST: Open-source code for equation of state inference via nested sampling.