LambdaCDM

class astropy.cosmology.LambdaCDM(*args, **kwargs)[source]

Bases: astropy.cosmology.core.FLRW

FLRW cosmology with a cosmological constant and curvature.

This has no additional attributes beyond those of FLRW.

Parameters
H0python:float or Quantity [‘frequency’]

Hubble constant at z = 0. If a float, must be in [km/sec/Mpc]

Om0python:float

Omega matter: density of non-relativistic matter in units of the critical density at z=0.

Ode0python:float

Omega dark energy: density of the cosmological constant in units of the critical density at z=0.

Tcmb0python:float or scalar Quantity [‘temperature’], optional

Temperature of the CMB z=0. If a float, must be in [K]. Default: 0 [K]. Setting this to zero will turn off both photons and neutrinos (even massive ones).

Neffpython:float, optional

Effective number of Neutrino species. Default 3.04.

m_nuquantity-like [‘energy’, ‘mass’] or numpy:array_like, optional

Mass of each neutrino species in [eV] (mass-energy equivalency enabled). If this is a scalar Quantity, then all neutrino species are assumed to have that mass. Otherwise, the mass of each species. The actual number of neutrino species (and hence the number of elements of m_nu if it is not scalar) must be the floor of Neff. Typically this means you should provide three neutrino masses unless you are considering something like a sterile neutrino.

Ob0python:float or python:None, optional

Omega baryons: density of baryonic matter in units of the critical density at z=0. If this is set to None (the default), any computation that requires its value will raise an exception.

namepython:str or python:None, optional

Name for this cosmological object.

Examples

>>> from astropy.cosmology import LambdaCDM
>>> cosmo = LambdaCDM(H0=70, Om0=0.3, Ode0=0.7)

The comoving distance in Mpc at redshift z:

>>> z = 0.5
>>> dc = cosmo.comoving_distance(z)

Methods Summary

de_density_scale(z)

Evaluates the redshift dependence of the dark energy density.

efunc(z)

Function used to calculate H(z), the Hubble parameter.

inv_efunc(z)

Function used to calculate \(\frac{1}{H_z}\).

w(z)

Returns dark energy equation of state at redshift z.

Methods Documentation

de_density_scale(z)[source]

Evaluates the redshift dependence of the dark energy density.

Parameters
znumpy:array_like

Input redshifts.

Returns
Indarray or python:float

The scaling of the energy density of dark energy with redshift. Returns float if input scalar.

Notes

The scaling factor, I, is defined by \(\rho(z) = \rho_0 I\), and in this case is given by \(I = 1\).

efunc(z)[source]

Function used to calculate H(z), the Hubble parameter.

Parameters
znumpy:array_like

Input redshifts.

Returns
Endarray or python:float

The redshift scaling of the Hubble constant. Returns float if input scalar.

Notes

The return value, E, is defined such that \(H(z) = H_0 E\).

inv_efunc(z)[source]

Function used to calculate \(\frac{1}{H_z}\).

Parameters
znumpy:array_like

Input redshifts.

Returns
Endarray or python:float

The inverse redshift scaling of the Hubble constant. Returns float if input scalar.

Notes

The return value, E, is defined such that \(H_z = H_0 / E\).

w(z)[source]

Returns dark energy equation of state at redshift z.

Parameters
znumpy:array_like

Input redshifts.

Returns
wndarray or python:float

The dark energy equation of state. Returns float if input scalar.

Notes

The dark energy equation of state is defined as \(w(z) = P(z)/\rho(z)\), where \(P(z)\) is the pressure at redshift z and \(\rho(z)\) is the density at redshift z, both in units where c=1. Here this is \(w(z) = -1\).