ScaleFactor#
- class astropy.cosmology.traits.ScaleFactor[source]#
Bases:
object
The trait for computing the cosmological scale factor.
The scale factor is defined as \(a = a_0 / (1 + z)\).
Attributes Summary
Scale factor at redshift 0.
Methods Summary
scale_factor
(z)Compute the scale factor at redshift
z
.Attributes Documentation
- scale_factor0#
Scale factor at redshift 0.
The scale factor is defined as \(a = a_0 / (1 + z)\). The common convention is to set \(a_0 = 1\). However, in some cases, like in some old CMB papers, \(a_0\) is used to normalize
a
to be a convenient number at the redshift of interest for that paper. Explicitly using \(a_0\) in both calculation and code avoids ambiguity.
Methods Documentation
- scale_factor(z: Quantity | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) Quantity [source]#
Compute the scale factor at redshift
z
.The scale factor is defined as \(a = a_0 / (1 + z)\).
- Parameters:
- zQuantity-like [‘redshift’] | numpy:array_like
Input redshift.
Changed in version 7.0: Passing z as a keyword argument is deprecated.
- Returns:
- |Quantity|
Scale factor at each input redshift.