py21cmfast.inputs.CosmoParams¶
- class py21cmfast.inputs.CosmoParams(*args, _base_cosmo=FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30964144154550644, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897468161869667), **kwargs)[source]¶
Cosmological parameters (with defaults) which translates to a C struct.
To see default values for each parameter, use
CosmoParams._defaults_
. All parameters passed in the constructor are also saved as instance attributes which should be considered read-only. This is true of all input-parameter classes.Default parameters are based on Plank18, https://arxiv.org/pdf/1807.06209.pdf, Table 2, last column. [TT,TE,EE+lowE+lensing+BAO]
- Parameters:
SIGMA_8 (float, optional) – RMS mass variance (power spectrum normalisation).
hlittle (float, optional) – The hubble parameter, H_0/100.
OMm (float, optional) – Omega matter.
OMb (float, optional) – Omega baryon, the baryon component.
POWER_INDEX (float, optional) – Spectral index of the power spectrum.
Methods
__init__
(*args[, _base_cosmo, Om0, Tcmb0, ...])clone
(**kwargs)Make a fresh copy of the instance with arbitrary parameters updated.
convert
(key, val)Make any conversions of values before saving to the instance.
from_astropy
(cosmo, **kwargs)Create a CosmoParams object from an astropy cosmology object.
get_fieldnames
([cstruct])Obtain the C-side field names of this struct.
get_fields
([cstruct])Obtain the C-side fields of this struct.
get_pointer_fields
([cstruct])Obtain all pointer fields of the struct (typically simulation boxes).
Delete the underlying C object, forcing it to be rebuilt.
update
(**kwargs)Update the parameters of an existing class structure.
Attributes
Omega lambda, dark energy density.
Return an astropy cosmology object for this cosmology.
Pure python dictionary representation of this class, as it would appear in C.
List names of fields of the underlying C struct.
List of fields of the underlying C struct (a list of tuples of "name, type").
List of names of fields which have pointer type in the C struct.
List of names of fields which have primitive type in the C struct.
A pure-python dictionary representation of the corresponding C structure.
Dictionary which if passed to its own constructor will yield an identical copy.