Skip to main content
`Ctrl`+`K`

# 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, equivalencies, ...]) | An isotropic and homogeneous (Friedmann-Lemaitre-Robertson-Walker) cosmology.
`FlatFLRWMixin`() | Mixin class for flat FLRW cosmologies.
`LambdaCDM`(H0, Om0, Ode0[, Tcmb0, ...]) | FLRW cosmology with a cosmological constant and curvature.
`FlatLambdaCDM`(H0, Om0[, Tcmb0, ...]) | FLRW cosmology with a cosmological constant and no curvature.
`wCDM`(H0, Om0, Ode0[, Tcmb0, equivalencies, ...]) | FLRW cosmology with a constant dark energy EoS and curvature.
`FlatwCDM`(H0, Om0[, Tcmb0, equivalencies, ...]) | FLRW cosmology with a constant dark energy EoS and no spatial curvature.
`w0waCDM`(H0, Om0, Ode0[, Tcmb0, ...]) | FLRW cosmology with a CPL dark energy EoS and curvature.
`Flatw0waCDM`(H0, Om0[, Tcmb0, equivalencies, ...]) | FLRW cosmology with a CPL dark energy EoS and no curvature.
`w0wzCDM`(H0, Om0, Ode0[, Tcmb0, ...]) | FLRW cosmology with a variable dark energy EoS and curvature.
`Flatw0wzCDM`(H0, Om0[, Tcmb0, equivalencies, ...]) | FLRW cosmology with a variable dark energy EoS and no curvature.
`wpwaCDM`(H0, Om0, Ode0[, Tcmb0, ...]) | FLRW cosmology with a CPL dark energy EoS, a pivot redshift, and curvature.
`FlatwpwaCDM`(H0, Om0[, Tcmb0, equivalencies, ...]) | 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