Components#

This page contains a list of protocols for components of a cosmology. These are not only components in the physical sense (e.g. “matter”, “baryons”) but more generally groups of closely related methods and properties (e.g. “Hubble parameter, time, and distance”).

At a higher level of abstraction, the sum of components makes a cosmology.

At a lower level of abstraction, a component consists of individual attributes.

Physical Components#

class NeutrinoComponent#

Bases: HasOmegaNu[Array, InputT], HasMNu[Array], HasNeff[Array], HasOmegaNu0[Array], Protocol

The cosmology has attributes and methods for the neutrino density.

Attributes

Neff

Effective number of neutrino species.

Omega_nu0

Omega neutrino; the neutrino density/critical density at z=0.

m_nu

Neutrino mass(es) in eV.

Methods

Omega_nu(z, /)

Redshift-dependent neutrino density parameter.

class BaryonComponent#

Bases: HasOmegaB[Array, InputT], HasOmegaB0[Array], Protocol

The cosmology has attributes and methods for the baryon density.

Attributes

Omega_b0

Omega baryon; the baryon density/critical density at z=0.

Methods

Omega_b(z, /)

Redshift-dependent baryon density parameter.

class PhotonComponent#

Bases: HasOmegaGamma[Array, InputT], HasOmegaGamma0[Array], Protocol

The cosmology has attributes and methods for the photons.

Attributes

Omega_gamma0

Omega gamma; the photon density/critical density at z=0.

Methods

Omega_gamma(z, /)

Redshift-dependent photon density parameter.

class DarkMatterComponent#

Bases: HasOmegaDM[Array, InputT], HasOmegaDM0[Array], Protocol

The cosmology has attributes and methods for the dark matter.

Attributes

Omega_dm0

Omega dark matter; the dark matter density/critical density at z=0.

Methods

Omega_dm(z, /)

Redshift-dependent dark matter density parameter.

class MatterComponent#

Bases: HasOmegaM[Array, InputT], HasOmegaM0[Array], Protocol

The cosmology has attributes and methods for the matter density.

Attributes

Omega_m0

Omega matter; the matter density/critical density at z=0.

Methods

Omega_m(z, /)

Redshift-dependent matter density parameter.

class DarkEnergyComponent#

Bases: HasOmegaDE[Array, InputT], HasOmegaDE0[Array], Protocol

The cosmology has attributes and methods for the dark energy.

Attributes

Omega_de0

Omega dark energy; the dark energy density/critical density at z=0.

Methods

Omega_de(z, /)

Redshift-dependent dark energy density parameter.

class CurvatureComponent#

Bases: HasOmegaK[Array, InputT], HasOmegaK0[Array], Protocol

The cosmology has attributes and methods for the global curvature.

Attributes

Omega_k0

Omega curvature; the effective curvature density/critical density at z=0.

Methods

Omega_k(z, /)

Redshift-dependent curvature density parameter.

class TotalComponent#

Bases: HasOmegaTot[Array, InputT], HasOmegaTot0[Array], Protocol

The cosmology has attributes and methods for the total density.

Attributes

Omega_tot0

Omega total; the total density/critical density at z=0.

Methods

Omega_tot(z, /)

Redshift-dependent total density parameter.

class CriticalDensity#

Bases: HasCriticalDensity[Array, InputT], HasCriticalDensity0[Array], Protocol

The object has attributes and methods for the critical density.

Attributes

critical_density0

Critical density at z = 0 in Msol Mpc-3.

Methods

critical_density(z, /)

Redshift-dependent critical density in Msol Mpc-3.

Distance Measures#

class HubbleParameter#

Bases: HasHoverH0[Array, InputT], HasH[Array, InputT], HasHubbleDistance[Array], HasHubbleTime[Array], HasH0[Array], Protocol

The object has methods for working with hubble quantities.

Attributes

H0

Hubble parameter at redshift 0 in km s-1 Mpc-1.

hubble_distance

Hubble distance in Mpc.

hubble_time

Hubble time in Gyr.

Methods

H(z, /)

Hubble parameter \(H(z)\) in km s-1 Mpc-1.

H_over_H0(z, /)

Standardised Hubble function \(E(z) = H(z)/H_0\).

class ScaleFactor#

Bases: HasScaleFactor[Array, InputT], HasScaleFactor0[Array], Protocol

The object has attributes and methods for the scale factor.

Attributes

scale_factor0

Scale factor at z=0.

Methods

scale_factor(z, /)

Redshift-dependenct scale factor.

class TemperatureCMB#

Bases: HasTCMB[Array, InputT], HasTCMB0[Array], Protocol

The object has attributes and methods for the background temperature.

Attributes

T_cmb0

CMB temperature in K at z=0.

Methods

T_cmb(z, /)

CMB temperature in K at redshift z.

class LookbackDistanceMeasures#

Bases: HasLookbackDistance[Array, InputT], HasLookbackTime[Array, InputT], Protocol

The object has attributes and methods for lookback distance measures.

Methods

lookback_distance(...)

Lookback distance \(d_T\) in Mpc.

lookback_time(-> ~cosmology.api._array_api.Array)

Lookback time in Gyr.

class ComovingDistanceMeasures#

Bases: HasComovingDistance[Array, InputT], HasTransverseComovingDistance[Array, InputT], HasComovingVolume[Array, InputT], HasDifferentialComovingVolume[Array, InputT], Protocol

The object has attributes and methods for comoving distance measures.

Methods

comoving_distance(...)

Comoving line-of-sight distance \(d_c\) in Mpc.

comoving_volume(...)

Comoving volume \(V_c\) in Mpc3.

differential_comoving_volume(z, /)

Differential comoving volume in Mpc3 per steradian.

transverse_comoving_distance(...)

Transverse comoving distance \(d_M\) in Mpc.

class ProperDistanceMeasures#

Bases: HasProperDistance[Array, InputT], HasProperTime[Array, InputT], Protocol

The object has attributes and methods for proper distance measures.

Methods

proper_distance(...)

Proper distance \(d\) in Mpc.

proper_time(-> ~cosmology.api._array_api.Array)

Proper time \(t\) in Gyr.

class DistanceMeasures#

Bases: ScaleFactor[Array, InputT], TemperatureCMB[Array, InputT], ComovingDistanceMeasures[Array, InputT], ProperDistanceMeasures[Array, InputT], LookbackDistanceMeasures[Array, InputT], HasAge[Array, InputT], HasAngularDiameterDistance[Array, InputT], HasLuminosityDistance[Array, InputT], Protocol

Cosmology API protocol for isotropic cosmologies.

This is a protocol class that defines the standard API for isotropic background calculations. It is not intended to be instantiated. Instead, it should be used for isinstance checks or as an ABC for libraries that wish to define a compatible cosmology class.

Attributes

T_cmb0

CMB temperature in K at z=0.

scale_factor0

Scale factor at z=0.

Methods

T_cmb(z, /)

CMB temperature in K at redshift z.

age(z, /)

Age of the universe at redshift z in Gyr.

angular_diameter_distance(...)

Angular diameter distance \(d_A\) in Mpc.

comoving_distance(...)

Comoving line-of-sight distance \(d_c\) in Mpc.

comoving_volume(...)

Comoving volume \(V_c\) in Mpc3.

differential_comoving_volume(z, /)

Differential comoving volume in Mpc3 per steradian.

lookback_distance(...)

Lookback distance \(d_T\) in Mpc.

lookback_time(-> ~cosmology.api._array_api.Array)

Lookback time in Gyr.

luminosity_distance(...)

Redshift-dependent luminosity distance \(d_L\) in Mpc.

proper_distance(...)

Proper distance \(d\) in Mpc.

proper_time(-> ~cosmology.api._array_api.Array)

Proper time \(t\) in Gyr.

scale_factor(z, /)

Redshift-dependenct scale factor.

transverse_comoving_distance(...)

Transverse comoving distance \(d_M\) in Mpc.