Private Methods

The following methods are used internally but not exported. They are not guaranteed to have stable APIs or be properly documented.

Cosmology.nu_relative_densityFunction
nu_relative_density(m_nu::Number, Neff::Number, nu_temp::Number N_nu::Number=n_nu(Neff))
nu_relative_density(m_nu, Neff::Number, nu_temp::Number, N_nu::Union{Nothing,Number}=nothing)
nu_relative_density(c::AbstractCosmology, z)
nu_relative_density(c::AbstractCosmology)

Return the neutrino density function relative to the energy density in photons. If !(m_nu isa Number), then m_nu should be iterable and indexable. When called with an AbstractCosmology but without a redshift, returns the z=0 value.

Arguments

  • m_nu::Any; either a Number or an iterable (like an Array or Tuple) that contains the neutrino masses in eV.
  • Neff; effective number of neutrino species; see Cosmology.Neff.
  • N_nu; number of neutrino species; see Cosmology.n_nu.
  • nu_temp; temperature of neutrino background in Kelvin; see T_nu. This is the argument that carries the redshift dependence.
Note

It is recommended that length(m_nu) == N_nu, unless N_nu==0 in which case it doesn't matter. For example, if N_nu==3 and you want one massive neutrino species with mass 0.06 eV, you should write m_nu=(0.0,0.0,0.06). The current implementation is kind of stupid and can miscount the number of massless neutrinos if length(m_nu) != N_nu.

source
Cosmology.a2EFunction
a2E(c::AbstractCosmology,a)
a2E(a,OmegaM,OmegaK,OmegaL,OmegaG,Tcmb0,m_nu,Neff,w0=-1,wa=0)

Return the cosmological E factor times the square of the scale factor a.

Examples

julia> Cosmology.a2E(Cosmology.Planck18,0.8)
0.7287593862161843
source
Cosmology.hubble_dist0Function
hubble_dist0(c::AbstractCosmology)

Return the Hubble distance at present-day in Mpc, defined as the speed of light times the Hubble time at present-day.

\[ D_0 = \frac{c}{H_0}\]

Examples

julia> Cosmology.hubble_dist0(Cosmology.Planck18) ≈ 4430.866952409105 * UnitfulAstro.Mpc
true
source
Cosmology.hubble_time0Function
hubble_time0(c::AbstractCosmology)

Return $\frac{1}{\text{H}_0}$ in Gyr.

Examples

julia> Cosmology.hubble_time0(Cosmology.Planck18) ≈ 14.451555153425796 * Unitful.Gyr
true
source
Cosmology.wFunction
w(c::Union{FlatWCDM,OpenWCDM,ClosedWCDM,FlatLCDM,OpenLCDM,ClosedLCDM},z)
w(z::Real,w0::Real,wa::Real)

Evaluates the redshift dependence of the dark energy equation of state,

\[w \equiv \frac{p_\Lambda}{\rho_\Lambda},\]

the ratio of the pressure to the energy density. The scaling factor, $I(z)$, is defined by $ρ_Λ(z) = I(z) \ ρ_{Λ,0}$.

source
Cosmology.de_density_scaleFunction
de_density_scale(c::Union{FlatWCDM,OpenWCDM,ClosedWCDM},z)
de_density_scale(z::Real,w0::Real,wa::Real)

Returns the redshift scaling of the dark energy density. See ρ_Λ.

source