wCDM¶

class
astropy.cosmology.
wCDM
(H0, Om0, Ode0, w0=1.0, Tcmb0=0, Neff=3.04, m_nu=<Quantity 0. eV>, Ob0=None, name=None)[source]¶ Bases:
astropy.cosmology.FLRW
FLRW cosmology with a constant dark energy equation of state and curvature.
This has one additional attribute beyond those of FLRW.
 Parameters
 H0float or
Quantity
Hubble constant at z = 0. If a float, must be in [km/sec/Mpc]
 Om0float
Omega matter: density of nonrelativistic matter in units of the critical density at z=0.
 Ode0float
Omega dark energy: density of dark energy in units of the critical density at z=0.
 w0float, optional
Dark energy equation of state at all redshifts. This is pressure/density for dark energy in units where c=1. A cosmological constant has w0=1.0.
 Tcmb0float or scalar
Quantity
, 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).
 Nefffloat, optional
Effective number of Neutrino species. Default 3.04.
 m_nu
Quantity
, optional Mass of each neutrino species. 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.
 Ob0float or 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.
 namestr, optional
Name for this cosmological object.
 H0float or
Examples
>>> from astropy.cosmology import wCDM >>> cosmo = wCDM(H0=70, Om0=0.3, Ode0=0.7, w0=0.9)
The comoving distance in Mpc at redshift z:
>>> z = 0.5 >>> dc = cosmo.comoving_distance(z)
Attributes Summary
Dark energy equation of state
Methods Summary
de_density_scale
(self, z)Evaluates the redshift dependence of the dark energy density.
efunc
(self, z)Function used to calculate H(z), the Hubble parameter.
inv_efunc
(self, z)Function used to calculate \(\frac{1}{H_z}\).
w
(self, z)Returns dark energy equation of state at redshift
z
.Attributes Documentation

w0
¶ Dark energy equation of state
Methods Documentation

de_density_scale
(self, z)[source]¶ Evaluates the redshift dependence of the dark energy density.
 Parameters
 zarray_like
Input redshifts.
 Returns
 Indarray, or float if input scalar
The scaling of the energy density of dark energy with redshift.
Notes
The scaling factor, I, is defined by \(\rho(z) = \rho_0 I\), and in this case is given by \(I = \left(1 + z\right)^{3\left(1 + w_0\right)}\)

efunc
(self, z)[source]¶ Function used to calculate H(z), the Hubble parameter.
 Parameters
 zarray_like
Input redshifts.
 Returns
 Endarray, or float if input scalar
The redshift scaling of the Hubble constant.
Notes
The return value, E, is defined such that \(H(z) = H_0 E\).

inv_efunc
(self, z)[source]¶ Function used to calculate \(\frac{1}{H_z}\).
 Parameters
 zarray_like
Input redshifts.
 Returns
 Endarray, or float if input scalar
The inverse redshift scaling of the Hubble constant.
Notes
The return value, E, is defined such that \(H_z = H_0 / E\).

w
(self, z)[source]¶ Returns dark energy equation of state at redshift
z
. Parameters
 zarray_like
Input redshifts.
 Returns
 wndarray, or float if input scalar
The dark energy equation of state
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) = w_0\).