Cosmology¶
- class hmf.cosmology.cosmo.Cosmology(*args, **kwargs)[source]¶
Basic Cosmology object.
This class thinly wraps cosmology objects from the astropy package. The full functionality of the astropy cosmology objects are available in the
cosmoattribute. What the class adds to the existing astropy implementation is the specification of the cosmological parameters as parameter inputs to an over-arching Framework.In particular, while any instance of a subclass of
astropy.cosmology.FLRWmay be passed as the base cosmology, the specific parameters can be updated individually by passing them through the cosmo_params dictionary (both in the constructor and theupdate()method.This dictionary is kept in memory and so adding a different parameter on a later update will update the dictionary, rather than replacing it.
To read a standard documented list of parameters, use
Cosmology.parameter_info(). If you want to just see the plain list of available parameters, useCosmology.get_all_parameters(). To see the actual defaults for each parameter, useCosmology.get_all_parameter_defaults().Attributes
Methods
- __init__(cosmo_model=FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897), cosmo_params=None)[source]
- clone(**kwargs)
Create and return an updated clone of the current object.
- classmethod get_all_parameter_defaults(recursive=True)
Dictionary of all parameters and defaults.
- classmethod get_all_parameter_names()
Yield all parameter names in the class.
- get_dependencies(*q)
Determine all parameter dependencies of the quantities in q.
- classmethod parameter_info(names=None)
Prints information about each parameter in the class.
Optionally, restrict printed parameters to those found in the list of names provided.
- classmethod quantities_available()
Obtain a list of all available output quantities.
- update(**kwargs)
Update parameters of the framework with kwargs.
- validate()
Perform validation of the input parameters as they relate to each other.