CosmoFit.Cosmology¶
- class CosmoFit.Cosmology(params)[source]¶
Bases:
objectBase class for all cosmological models.
Subclasses that need a parameter beyond the standard
CosmologyParametersset (e.g. a genuinely new, not-in-the-literature model) can declare anEXTRA_PARAMSclass attribute – a dict of{name: {"default": ..., "bounds": (lo, hi), "label": ...}}– and__init_subclass__below builds a matching parameter dataclass (PARAMS_CLASS) and aself.<name>property automatically. Seecosmology.custom.define_model()for the minimal-code way to do this without subclassing by hand.- Parameters:
params (CosmologyParameters)
- __init__(params)[source]¶
- Parameters:
params (CosmologyParameters)
Methods
E(z)H(z)Omega_de(z)Omega_matter(z)Matter density at redshift
z, in units of today's critical density -- i.e. theOmega_m (1+z)^3term as it appears insideE(z)^2, before dividing byE(z)^2.__init__(params)dEdz(z)mu(a[, k])Effective-to-Newtonian gravitational coupling ratio, G_eff(a,k)/G_N, entering the linear growth equation solved by
GrowthCalculator(see that module's docstring for the equation itself).plain_name()This model's name as plain text:
MODEL_NAMEif it declares one, else the class name.plot_label()This model's name as it should appear in a figure legend or title --
MODEL_LABEL(LaTeX) if it declares one, elseplain_name().refresh()Rebuild internal numerical tables after the underlying
paramsobject has been mutated in place (e.g. byparams.update(theta)during an MCMC step).Attributes
A_planckA_sEXTRA_PARAMSExtra parameters this model adds beyond CosmologyParameters.
H0MBMODEL_LABELa LaTeX math string where the plain name is really a set of symbols (
LCDM->$\Lambda$CDM), None where the plain name is already what a reader should see (an acronym likeCPL).MODEL_NAMEPlain-text name for this model, for tables, JSON and log lines.
N_effOmega_bOmega_de0Omega_kOmega_malphacompute_rdWhether
rdis computed from the physical densities (rd_computed()) rather than read from the freerdparameter.derive_sigma8Whether
sigma8is derived from the Boltzmann code rather than read from the freesigma8parameter.hReduced Hubble constant,
H0 / 100.ln1e10Asm_nun_somega_b_h2Physical baryon density,
Omega_b h^2-- the combination BBN and the CMB actually constrain.omega_cdm_h2Physical cold dark matter density,
Omega_c h^2-- matter less baryons.omega_m_h2Physical matter density,
Omega_m h^2.rdThe sound horizon at the drag epoch [Mpc] that the BAO likelihoods divide by.
sigma8Present-day
sigma_8, the normalization every growth prediction is built on.tau_reiow0wa