Reference/API#

astropy.cosmology Package#

Cosmology with Astropy.

cosmology contains classes and functions for cosmological distance measures and other cosmology-related calculations.

See the Cosmological Calculations (astropy.cosmology) for more detailed usage examples and references.

Functions#

z_at_value(func, fval[, zmin, zmax, ztol, ...])

Find the redshift z at which func(z) = fval.

cosmology_equal(cosmo1, cosmo2, /, *[, ...])

Return element-wise equality check on the cosmologies.

Classes#

Cosmology([name, meta])

Base-class for all Cosmologies.

CosmologyError

FlatCosmologyMixin()

Mixin class for flat cosmologies.

FLRW(H0, Om0, Ode0[, Tcmb0, Neff, m_nu, ...])

An isotropic and homogeneous (Friedmann-Lemaitre-Robertson-Walker) cosmology.

FlatFLRWMixin(*args, **kw)

Mixin class for flat FLRW cosmologies.

LambdaCDM(H0, Om0, Ode0[, Tcmb0, Neff, ...])

FLRW cosmology with a cosmological constant and curvature.

FlatLambdaCDM(H0, Om0[, Tcmb0, Neff, m_nu, ...])

FLRW cosmology with a cosmological constant and no curvature.

wCDM(H0, Om0, Ode0[, w0, Tcmb0, Neff, m_nu, ...])

FLRW cosmology with a constant dark energy EoS and curvature.

FlatwCDM(H0, Om0[, w0, Tcmb0, Neff, m_nu, ...])

FLRW cosmology with a constant dark energy EoS and no spatial curvature.

w0waCDM(H0, Om0, Ode0[, w0, wa, Tcmb0, ...])

FLRW cosmology with a CPL dark energy EoS and curvature.

Flatw0waCDM(H0, Om0[, w0, wa, Tcmb0, Neff, ...])

FLRW cosmology with a CPL dark energy EoS and no curvature.

w0wzCDM(H0, Om0, Ode0[, w0, wz, Tcmb0, ...])

FLRW cosmology with a variable dark energy EoS and curvature.

Flatw0wzCDM(H0, Om0[, w0, wz, Tcmb0, Neff, ...])

FLRW cosmology with a variable dark energy EoS and no curvature.

wpwaCDM(H0, Om0, Ode0[, wp, wa, zp, Tcmb0, ...])

FLRW cosmology with a CPL dark energy EoS, a pivot redshift, and curvature.

FlatwpwaCDM(H0, Om0[, wp, wa, zp, Tcmb0, ...])

FLRW cosmology with a CPL dark energy EoS, a pivot redshift, and no curvature.

Parameter(*, default, derived, unit, ...)

Cosmological parameter (descriptor).

default_cosmology()

The default cosmology to use.

Class Inheritance Diagram#

Inheritance diagram of astropy.cosmology.core.Cosmology, astropy.cosmology.core.CosmologyError, astropy.cosmology.core.FlatCosmologyMixin, astropy.cosmology.flrw.base.FLRW, astropy.cosmology.flrw.base.FlatFLRWMixin, astropy.cosmology.flrw.lambdacdm.LambdaCDM, astropy.cosmology.flrw.lambdacdm.FlatLambdaCDM, astropy.cosmology.flrw.w0cdm.wCDM, astropy.cosmology.flrw.w0cdm.FlatwCDM, astropy.cosmology.flrw.w0wacdm.w0waCDM, astropy.cosmology.flrw.w0wacdm.Flatw0waCDM, astropy.cosmology.flrw.w0wzcdm.w0wzCDM, astropy.cosmology.flrw.w0wzcdm.Flatw0wzCDM, astropy.cosmology.flrw.wpwazpcdm.wpwaCDM, astropy.cosmology.flrw.wpwazpcdm.FlatwpwaCDM, astropy.cosmology.parameter._core.Parameter, astropy.cosmology.realizations.default_cosmology