wcosmo.astropy.FlatLambdaCDM#

class wcosmo.astropy.FlatLambdaCDM(H0, Om0, Tcmb0=None, Neff=None, m_nu=None, Ob0=None, *, zmin=0.0001, zmax=100, method='pade', name=None, meta=None)[source]#
__init__(H0, Om0, Tcmb0=None, Neff=None, m_nu=None, Ob0=None, *, zmin=0.0001, zmax=100, method='pade', name=None, meta=None)[source]#

FLRW cosmology with a cosmological constant and no curvature.

This has no additional attributes beyond those of FLRW.

Docstring copied from astropy.cosmology.flrw.lambdacdm.FlatLambdaCDM

Parameters:
H0float or scalar quantity-like [‘frequency’]

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

Om0float

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

Tcmb0float or scalar quantity-like [‘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).

Nefffloat, optional

Effective number of Neutrino species. Default 3.04.

m_nuquantity-like [‘energy’, ‘mass’] or 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.

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.

method: str (optional, keyword-only)

The integration method, should be one of pade or analytic for the pade approximation or analytic hypergeometric methods respectively.

namestr or None (optional, keyword-only)

Name for this cosmological object.

metamapping or None (optional, keyword-only)

Metadata for the cosmology, e.g., a reference.

Examples

>>> from astropy.cosmology import FlatLambdaCDM
>>> cosmo = FlatLambdaCDM(H0=70, Om0=0.3)

The comoving distance in Mpc at redshift z:

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

Methods

H(z)

Compute the Hubble parameter \(H(z)\) for a flat wCDM cosmology.

__init__(H0, Om0[, Tcmb0, Neff, m_nu, Ob0, ...])

FLRW cosmology with a cosmological constant and no curvature.

absorption_distance(z)

Compute the absorption distance using an analytic integral of the Pade approximation.

age(z[, zmax])

Compute the age of the universe at redshift z.

comoving_distance(z)

Compute the comoving distance using an analytic integral of the Pade approximation.

comoving_transverse_distance(z)

Compute the comoving distance using an analytic integral of the Pade approximation.

comoving_volume(z)

Compute the comoving volume out to redshift z.

dDLdz(z)

The Jacobian for the conversion of redshift to luminosity distance.

dLdH(z)

Derivative of the luminosity distance w.r.t.

de_density_scale(z)

Dark energy density at redshift z.

detector_to_source_frame(m1z, m2z, dL[, ...])

Convert masses and luminosity distance from the detector frame to source frame masses and redshift.

differential_comoving_volume(z)

Compute the differential comoving volume element.

distmod(z)

Compute the distance modulus at redshift z.

efunc(z)

Compute the \(E(z)\) function for a flat wCDM cosmology.

inv_efunc(z)

Compute the inverse of the E(z) function for a flat wCDM cosmology.

lookback_time(z)

Compute the lookback time using an analytic integral of the Pade approximation.

luminosity_distance(z)

Compute the luminosity distance using an analytic integral of the Pade approximation.

source_to_detector_frame(m1, m2, z)

Convert masses and redshift from the source frame to the detector frame.

Attributes

H0

hubble_distance

Compute the Hubble distance \(D_H = c H_0^{-1}\) in Mpc.

hubble_time

Compute the Hubble time \(t_H = H_0^{-1}\) in Gyr.