API
Cosmos.Maybe
— TypeUseful alias for type definition. To prevent conflicts, this is not exported.
Cosmos.defaultCosmologyRef
— ConstantDefine global variable to hold information about the default cosmological model.
Cosmos.AbstractDistanceMeasure
— TypeAbstract supertype for distance measurements. Sub-types include: . DistanceComoving
, . DistanceLightTravel
, . DistanceAngularDiameter
, . DistanceComovingTransverse
, . DistanceLuminosity
.
Cosmos.AbstractTimeMeasure
— TypeAbstract supertype for time measurements. Sub-types include: . TimeLookback
, . TimeConformal
.
Cosmos.CosmologicalModel
— TypeGeneral struct to hold a Cosmology.jl
object of type AbstractCosmology
. It exposes the relevant cosmological parameters and adds new ones. The equation of state follows the Chevallier-Polarski-Linder parametrisation:
"Accelerating Universes with Scaling Dark Matter"
M. Chevallier and D. Polarski
International Journal of Modern Physics D 10 (2001) 213.
https://arxiv.org/abs/gr-qc/0009008
https://doi.org/10.1142/S0218271801000822
"Exploring the Expansion History of the Universe"
E. Linder
Physical Review Letters 90 (2003) 091301.
https://doi.org/10.1103/PhysRevLett.90.091301
The default constructors can be built using only the first 3 or 4 parameters.
Members
. h
[Real
]: dimensionless Hubble constant
. Ωm
[Real
]: matter density
. Ωr
[Real
]: radiation density
. Ωk
[Real
]: curvature density
. ΩΛ
[Real
]: dark energy density
. Ωb
[Real
]: baryon density (set to -1 if unavailable)
. Nν
[Real
]: number of effective neutrino species (defaults to 3)
. Tcmb
[Real
]: CMB temperature at present time (defaults to 2.7255 K, following Planck)
. wEOSΛ
[NTuple{2, Real}
]: tuple with parameters of the equation of state for dark energy: w = w_0 + w_a (1 - a)
. cosmology
[AbstractCosmology
]: object from
Cosmology.jl`
. toRedshift
[Dict{Symbol, Function}
]: functions to convert distance/time to redshift (:comoving
, :lightTravel
, :angularDiameter
,:transverseComoving
, :luminosity
, :lookback
, :conformal
)
. fromRedshift::Dict{Symbol, Function}
: functions to convert distance/time from redshift (:comoving
, :lightTravel
, :angularDiameter
, :transverseComoving
, :luminosity
, :lookback
, :conformal
)
. zArray
[Vector{T}
]: array of values of redshift to build distance/time conversion functions; if nothing defaults to built-in values
Examples
# define parameters
Tcmb = 2.7255
h = 0.69
ΩΛ = 0.7099
Ωk = 0.
Ωm = 0.29
Ωr = 1. - ΩΛ - Ωk - Ωm
Nν = 3.04
# some constructors
cosmo1 = CosmologicalModel(Cosmology.FlatLCDM{Float64}(h, ΩΛ, Ωm, Ωr); Nν = Nν, Tcmb = Tcmb)
cosmo2 = CosmologicalModel(h, Ωm; Tcmb = Tcmb, Nν = Nν) # assumes Ωr = 0
cosmo3 = CosmologicalModel(h, Ωm, Ωk; Tcmb = Tcmb, Nν = Nν) # if geometry is not flat and Ωr = 0
cosmo4 = CosmologicalModel(h, Ωm, Ωk, Ωr; Tcmb = Tcmb, Nν = Nν) # includes radiation and non-flat geometry
To do
. Consider taking Unitful
quantities.
. Should this struct be immutable?
Cosmos.DistanceAngularDiameter
— TypeConvenient object to help with distance measures conversions. The angular diameter distance is the ratio of an object's transverse length to its angular size. It relates to the transverse comoving distance in the following way: da = dm / (1 + z)
For more information see: "Distance measures in cosmology"
D. Hogg
arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. d::Length{T}
: the distance
Cosmos.DistanceAngularDiameter
— MethodConstructor for DistanceAngularDiameter{D}
from Cosmos.DistanceComovingTransverse
. It essentially convert from Cosmos.DistanceComovingTransverse
to DistanceAngularDiameter
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceAngularDiameter
— MethodConstructor for DistanceAngularDiameter{D}
from DistanceComoving
. It essentially convert from DistanceComoving
to DistanceAngularDiameter
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceAngularDiameter
— MethodConstructor for DistanceAngularDiameter{D}
from DistanceLightTravel
. It essentially convert from DistanceLightTravel
to DistanceAngularDiameter
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceAngularDiameter
— MethodConstructor for DistanceAngularDiameter{D}
from DistanceLuminosity
. It essentially convert from DistanceLuminosity
to DistanceAngularDiameter
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComoving
— TypeConvenient object to help with distance measures conversions. The comoving distance is the distance between any two points in the reference frame of the Hubble flow. This is defined as: dc = RH ∫ dz / E(z) between any two points z1 and z2.
For more information see: "Distance measures in cosmology"
D. Hogg
arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. d::Length{T}
: the distance
Cosmos.DistanceComoving
— MethodConstructor for DistanceComoving{D}
from Cosmos.DistanceComovingTransverse
. It essentially convert from Cosmos.DistanceComovingTransverse
to DistanceComoving
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComoving
— MethodConstructor for DistanceComoving{D}
from DistanceAngularDiameter
. It essentially convert from DistanceAngularDiameter
to DistanceComoving
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComoving
— MethodConstructor for DistanceComoving{D}
from DistanceLightTravel
. It essentially convert from DistanceLightTravel
to DistanceComoving
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComoving
— MethodConstructor for DistanceComoving{D}
from DistanceLuminosity
. It essentially convert from DistanceLuminosity
to DistanceComoving
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComovingTransverse
— TypeConvenient object to help with distance measures conversions. For two objects at the same redshift separated by a given angle, the transverse comoving distance depends on the curvature: dm = dc if Ωk=0 dm = RH sinh(sqrt(|Ωk|) dc / RH) / sqrt(|Ωk|) otherwise
For more information see: "Distance measures in cosmology"
D. Hogg
arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. d::Length{T}
: the distance
Cosmos.DistanceComovingTransverse
— MethodConstructor for Cosmos.DistanceComovingTransverse{D}
from DistanceAngularDiameter
. It essentially convert from DistanceAngularDiameter
to Cosmos.DistanceComovingTransverse
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComovingTransverse
— MethodConstructor for Cosmos.DistanceComovingTransverse{D}
from DistanceComoving
. It essentially convert from DistanceComoving
to Cosmos.DistanceComovingTransverse
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComovingTransverse
— MethodConstructor for Cosmos.DistanceComovingTransverse{D}
from DistanceLightTravel
. It essentially convert from DistanceLightTravel
to Cosmos.DistanceComovingTransverse
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceComovingTransverse
— MethodConstructor for Cosmos.DistanceComovingTransverse{D}
from DistanceLuminosity
. It essentially convert from DistanceLuminosity
to Cosmos.DistanceComovingTransverse
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLightTravel
— TypeConvenient object to help with distance measures conversions. The light-travel distance corresponds to the time light from a given object would take to reach an observer.
For more information see: "Distance measures in cosmology"
D. Hogg
arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. d::Length{T}
: the distance
Cosmos.DistanceLightTravel
— MethodConstructor for DistanceLightTravel{D}
from Cosmos.DistanceComovingTransverse
. It essentially convert from Cosmos.DistanceComovingTransverse
to DistanceLightTravel
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLightTravel
— MethodConstructor for DistanceLightTravel{D}
from DistanceAngularDiameter
. It essentially convert from DistanceAngularDiameter
to DistanceLightTravel
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLightTravel
— MethodConstructor for DistanceLightTravel{D}
from DistanceComoving
. It essentially convert from DistanceComoving
to DistanceLightTravel
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLightTravel
— MethodConstructor for DistanceLightTravel{D}
from DistanceLuminosity
. It essentially convert from DistanceLuminosity
to DistanceLightTravel
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLuminosity
— TypeConvenient object to help with distance measures conversions. The luminosity distance is related to the flux (Φ) and the bolometric luminosity (L) as: d_L = sqrt(L / 4πΦ) .
For more information see: "Distance measures in cosmology"
D. Hogg
arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. d::Length{T}
: the distance
Cosmos.DistanceLuminosity
— MethodConstructor for DistanceLuminosity{D}
from Cosmos.DistanceComovingTransverse
. It essentially convert from Cosmos.DistanceComovingTransverse
to DistanceLuminosity
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLuminosity
— MethodConstructor for DistanceLuminosity{D}
from DistanceAngularDiameter
. It essentially convert from DistanceAngularDiameter
to DistanceLuminosity
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLuminosity
— MethodConstructor for DistanceLuminosity{D}
from DistanceComoving
. It essentially convert from DistanceComoving
to DistanceLuminosity
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.DistanceLuminosity
— MethodConstructor for DistanceLuminosity{D}
from DistanceLightTravel
. It essentially convert from DistanceLightTravel
to DistanceLuminosity
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.Redshift
— TypeConvenient object to handle redshifts.
Cosmos.ScaleFactor
— TypeConvenient object to handle scale factors.
Cosmos.TimeConformal
— TypeConvenient object to help with time measures conversions. This is the time in the frame of the Hubble flow. It is defined as: t_c = ∫ dt / a(t) between any two points z1 and z2.
For more information see: "Distance measures in cosmology". D. Hogg arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. t::Time{T}
: the time
Cosmos.TimeConformal
— Methodconvert(TimeType, time)
Type conversion from TimeLookback
to TimeConformal
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Cosmos.TimeLookback
— TypeConvenient object to help with time measures conversions. The lookback time distance corresponds to the time difference between the universe's age at t2 and t1. tl = tH ∫ dz / E(z) / (1 + z)
For more information see: "Distance measures in cosmology". D. Hogg arXiv:astro-ph/9905116
Input
. cosmology::CosmologicalModel
: the cosmological model to be used as reference
. t::Time{T}
: the time
Cosmos.TimeLookback
— Methodconvert(TimeType, time)
Type conversion from TimeConformal
to TimeLookback
. It ultimately enables conversion implicit conversions and the usage of the operator |>
.
Base.:==
— MethodOperations with Redshift
.
Base.:==
— MethodOperations with ScaleFactor
.
Base.:==
— MethodObject equality comparison.
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from DistanceAngularDiameter
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from DistanceComoving
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from DistanceLightTravel
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from DistanceLuminosity
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from TimeConformal
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(ScaleFactor, distance)
Type conversion from TimeLookback
to ScaleFactor
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceAngularDiameter
to Cosmos.DistanceComovingTransverse
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceComoving
to Cosmos.DistanceComovingTransverse
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLightTravel
to Cosmos.DistanceComovingTransverse
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLuminosity
to Cosmos.DistanceComovingTransverse
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to DistanceAngularDiameter
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceComoving
to DistanceAngularDiameter
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLightTravel
to DistanceAngularDiameter
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLuminosity
to DistanceAngularDiameter
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to DistanceComoving
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceAngularDiameter
to DistanceComoving
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLightTravel
to DistanceComoving
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLuminosity
to DistanceComoving
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to DistanceLightTravel
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceAngularDiameter
to DistanceLightTravel
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceComoving
to DistanceLightTravel
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLuminosity
to DistanceLightTravel
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to DistanceLuminosity
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceAngularDiameter
to DistanceLuminosity
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceComoving
to DistanceLuminosity
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversion from DistanceLightTravel
to DistanceLuminosity
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume distances with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to Cosmos.DistanceComovingTransverse
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to Cosmos.DistanceComovingTransverse
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to DistanceAngularDiameter
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to DistanceAngularDiameter
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to DistanceComoving
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to DistanceComoving
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to DistanceLightTravel
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to DistanceLightTravel
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to DistanceLuminosity
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to DistanceLuminosity
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to TimeConformal
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to TimeConformal
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, redshift, cosmology)
convert(DistanceAngularDiameter, redshift, cosmology)
convert(DistanceLightTravel, redshift, cosmology)
convert(DistanceComovingTransverse, redshift, cosmology)
convert(DistanceLuminosity, redshift, cosmology)
Type conversion from Redshift
to TimeLookback
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceComoving, scaleFactor, cosmology)
convert(DistanceAngularDiameter, scaleFactor, cosmology)
convert(DistanceLightTravel, scaleFactor, cosmology)
convert(DistanceComovingTransverse, scaleFactor, cosmology)
convert(DistanceLuminosity, scaleFactor, cosmology)
Type conversion from ScaleFactor
to TimeLookback
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(TimeType, time)
Type conversion from TimeLookback
to TimeConformal
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume times with respect to present time (z=0).
Base.convert
— Methodconvert(TimeType, time)
Type conversion from TimeConformal
to TimeLookback
. This function performs no type checks. It assumes that the underlying CosmologicalModel
is the same for both. These conversions assume times with respect to present time (z=0).
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for Cosmos.DistanceComovingTransverse
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for DistanceAngularDiameter
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for DistanceComoving
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for DistanceLightTravel
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for DistanceLuminosity
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for TimeConformal
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— Methodconvert(DistanceType, distance)
Type conversions for TimeLookback
. This enables conversions between different distance measures (DistanceLightTravel
, DistanceComoving
, etc.) and the usage of the operator |>
.
Base.convert
— MethodType conversion.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.ClosedLCDM`.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.ClosedWCDM`.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.FlatLCDM`.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.FlatWCDM`.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.OpenLCDM`.
Base.convert
— MethodUseful extensions of Cosmology.jl
to enable type conversion related to
Cosmology.OpenWCDM`.
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from Cosmos.DistanceComovingTransverse
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from DistanceAngularDiameter
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from DistanceComoving
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from DistanceLightTravel
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from DistanceLuminosity
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from TimeConformal
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.convert
— Methodconvert(Redshift, distance)
Type conversion from TimeLookback
to Redshift
. These conversions assume distances/times with respect to present time (z=0).
Base.eltype
— MethodGet type of values contained in CosmologicalModel
object.
Base.eltype
— MethodGet the underlying data type of an AbstractCosmology
object (from Cosmology.jl
).
Base.eltype
— Methodeltype(redshift)
eltype(scaleFactor)
Get data type.
Base.promote_rule
— MethodPromotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodUseful extensions of Cosmology.jl implementing promotion rules.
Base.promote_rule
— MethodPromotion rules conversions for Cosmos.DistanceComovingTransverse
.
Base.promote_rule
— MethodPromotion rules conversions for DistanceAngularDiameter
.
Base.promote_rule
— MethodPromotion rules conversions for DistanceComoving
.
Base.promote_rule
— MethodPromotion rules conversions for DistanceLightTravel
.
Base.promote_rule
— MethodPromotion rules conversions for DistanceLuminosity
.
Base.promote_rule
— MethodPromotion rules conversions for TimeConformal
.
Base.promote_rule
— MethodPromotion rules conversions for TimeLookback
.
Base.show
— Method@show(io, cosmology)
print(io, cosmology)
println(io, cosmology)
Display information of CosmologicalModel
types.
Input
. io
[IO
]: IO
-type objects with standard output
. cosmology
[CosmologicalModel
]: the cosmological model object
Base.show
— Method@show(io, d)
print(io, d)
println(io, d)
Display information about AbstractDistanceMeasure
types. Note that distances are cosmology-dependent, but this information is not displayed.
Input
. io
[IO
]: IO
-type objects with standard output
. d
[AbstractDistanceMeasure
]: a distance object
Base.show
— Method@show(io, t)
print(io, t)
println(io, t)
Display information about AbstractTimeMeasure
types. Note that times are cosmology-dependent, but this information is not displayed.
Input
. io
[IO
]: IO
-type objects with standard output
. t
[AbstractTimeMeasure
]: the time measure
Base.show
— Method@show(io, z)
print(io, z)
println(io, z)
Display information of Redshift
types.
Input
. io
[IO
]: IO
-type objects with standard output
. z
[Redshift
]: the redshift
Base.show
— Method@show(io, a)
print(io, a)
println(io, a)
Display information about ScaleFactor
types.
Input
. io
[IO
]: IO
-type objects with standard output
. a
[ScaleFactor
]: the scale factor
Cosmos.CosmologyPlanck
— MethodLatest Planck's cosmology. This is based on: "Planck 2018 results. VI. Cosmological parameters" Planck Collaboration Astronomy and Astrophysics 641 (2020) A6. https://arxiv.org/abs/1807.06209 https://doi.org/10.1051/0004-6361/201833910
Input
. T::Type
: type of the data (defaults to Float64
)
Cosmos.ageOfUniverse
— MethodageOfUniverse(cosmo)
ageOfUniverse(cosmo, z)
Computes the Hubble distance for a given cosmology and possibly at a given redshift.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.comovingElement
— MethodcomovingElement(cosmology, z)
comovingElement(cosmology, a)
Calculates the comoving line element at a given redshift. This is Hogg's eq. 28 adjusted.
\[rac{d ll}{dz} = rac{c}{H(z)} rac{1}{E(z)}\]
NOTE: check nomenclature.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
. z
[Redshift
]: the redshift (of type Redshift
)
. a
[ScaleFactor
]: the scale factor type
Cosmos.comovingVolume
— MethodcomovingVolume(cosmology, z)
Calculates the comoving volume at a given redshift.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.comovingVolumeElement
— MethodcomovingVolumeElement(cosmology, z)
Calculates the comoving volume element at a given redshift.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.computeBaryonDensity
— MethodcomputeBaryonDensity(cosmology; z = 0.)
Computes the density of matter in the universe at a given redshift:
\[ \rho_\text{b} = \Omega_\text{b} \rho_\text{c}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.computeCriticalDensity
— MethodcomputeCriticalDensity(cosmology; z = 0.)
Computes the critical density of the universe at a given redshift:
\[ \rho_\text{c} = 3 \dfrac{3 H^2(z)}{8 \pi G}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.computeCurvatureDensity
— MethodcomputeCurvatureDensity(cosmology; z = 0.)
Computes the density of matter in the universe at a given redshift:
\[ \rho_\text{k} = \Omega_\text{k} \rho_\text{c}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.computeDarkEnergyDensity
— MethodcomputeDarkEnergyDensity(cosmology; z = 0.)
Computes the density of matter in the universe at a given redshift:
\[ \rho_\text{\Lambda} = \Omega_\Lambda \rho_\text{c}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.computeMatterDensity
— MethodcomputeMatterDensity(cosmology; z = 0.)
Computes the density of matter in the universe at a given redshift:
\[ \rho_\text{m} = \Omega_\text{m} \rho_\text{c}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.computeRadiationDensity
— MethodcomputeRadiationDensity(cosmology; z = 0.)
Computes the density of matter in the universe at a given redshift:
\[ \rho_\text{r} = \Omega_\text{r} \rho_\text{c}\]
Input
. cosmology::CosmologicalModel
: the cosmological model of interest \
. z::Real
: the redshift at which to compute the density \
Cosmos.conversionsFromRedshift
— MethodHelper function (unexported) to iniatilise conversions of distance or time to/from redshift.
To do
. Consider speeding up building this function using @threads
Cosmos.hubbleConstant
— MethodhubbleConstant(cosmology, z)
Compute the present-day Hubble constant.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
Cosmos.hubbleDistance
— MethodhubbleDistance(cosmo)
hubbleDistance(cosmo, z)
Computes the Hubble distance for a given cosmology and possibly at a given redshift.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.hubbleParameter
— MethodhubbleParameter(cosmology, z)
Compute the Hubble parameter H(z).
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.hubbleTime
— MethodhubbleTime(cosmo)
hubbleTime(cosmo, z)
Computes the Hubble distance for a given cosmology and possibly at a given redshift.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.isClosed
— MethodisClosed(cosmology)
Determine whether a CosmologicalModel
has a closed geometry.
Input
. cosmol::CosmologicalModel
: the cosmological model
Cosmos.isCold
— MethodisCold(cosmology)
Determine whether a CosmologicalModel
is described by cold dark matter.
Input
. cosmol::CosmologicalModel
: the cosmological model
Cosmos.isFlat
— MethodisFlat(cosmology)
Determine whether a CosmologicalModel
has a flat geometry.
Input
. cosmol::CosmologicalModel
: the cosmological model
Cosmos.isOpen
— MethodisOpen(cosmology)
Determine whether a CosmologicalModel
has an open geometry.
Input
. cosmol::CosmologicalModel
: the cosmological model
Cosmos.isWarm
— MethodisWarm(cosmology)
Determine whether a CosmologicalModel
is described by warm dark matter.
Input
. cosmol::CosmologicalModel
: the cosmological model
Cosmos.prepareRedshiftSamples
— MethodprepareRedshiftSamples(T::Type{<: Real})
Prepare a set of redshift samples for cosmological calculations. This function generates a range of redshift values, including negative, small, and large redshifts, to cover a wide range of cosmological scenarios. The redshift values are returned as a unique array of type T
.
Cosmos.scaleFactor
— MethodscaleFactor(z)
Compute the scale factor for a given cosmology. This should be the same for all cosmologies, by definition, but passing this argument fixes the correct type.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.scalingFunctionHubbleParameter
— MethodscalingFunctionHubbleParameter(cosmology, z)
Compute the scaling function for the Hubble parameter (often dubbed E
): $E(z) = \frac{H(z)}{H(0)} \sqrt{\Omega_r (1 + z)^4 + \Omega_m (1 + z)^3 + \Omega_k (1 + z)^2 + \Omega_\Lambda}$ This follows the definition from Peebles 1993 (p. ~310-322), adopted by Hogg, arXiv:astro-ph/9905116.
Input
. cosmo
[CosmologicalModel
]: the cosmological model
. z
[Real
]: the redshift
Cosmos.setDefaultCosmology
— MethodSet the value of the global default cosmological model. This will enable faster function calls. For instances, instead of d = DistanceComovingTransverse(1., cosmology)
, the second argument will become the default value.