Initialization

Basics

LensFactory.Cosmology.EzFunction
Ez(z::RV)

Calculates the dimensionless Hubble parameter $(E)$ at redshift, $z$. The formula is,

\[E(z) = \sqrt{ Ω_{m0} (1+z)^2 + Ω_{r0} (1+z)^4 + Ω_{k0} (1+z)^2 + Ω_{w0} (1+z)^{3(1+w)} }\]

source
LensFactory.Cosmology.hubble_parameterFunction
hubble_parameter(cosmology::AbstractCosmology, z::RV)

Calculates the Hubble parameter $(H)$ at redshift $z$ in ${\rm \mathbf{km/s/Mpc}}$. The formula is,

\[H(z) = H_0 \: E(z)\]

source

Time

LensFactory.Cosmology.ageFunction
age(cosmology::AbstractCosmology, z::RV)

Calculates the age $(t_{\rm age})$ of the Universe at redshift $z$ in ${\rm \mathbf{Gyr}}$. The formula is,

\[t_{\rm age}(z) = \int_z^\infty \frac{1}{(1+z')H(z')} dz' \]

source
LensFactory.Cosmology.lookback_timeFunction
lookback_time(cosmology::AbstractCosmology, z::RV)

Calculates lookbak time $(t_L)$ to a given redshift $z$ in ${\rm \mathbf{Gyr}}$. The formula is,

\[t_L(z) = \int_0^z \frac{1}{(1+z')H(z')} dz' \]

source

Density parameters

LensFactory.Cosmology.rho_czFunction
rho_cz(cosmology::AbstractCosmology, z::RV)

Calculates the critical density $(\rho_c)$ of the Universe at redshift $z$ in ${\rm \mathbf{kg/m^3}}$. The formula is,

\[\rho_c(z) = \frac{3 H^2(z)}{8 π {\rm G} }\]

source
LensFactory.Cosmology.Omega_mzFunction
Omega_mz(cosmology::AbstractCosmology, z::RV)

Calculates the matter density parameter $(\Omega_{m})$ at redshift z. The formula is,

\[Ω_{m}(z) = Ω_{m}(0) \: (1+z)^3 \left( \frac{H0}{H(z)} \right)^2\]

source
LensFactory.Cosmology.Omega_rzFunction
Omega_rz(cosmology::AbstractCosmology, z::RV)

Calculates the matter density parameter $(\Omega_{r})$ at redshift z. The formula is,

\[Ω_{r}(z) = Ω_{r}(0) \: (1+z)^4 \left( \frac{H_0}{H(z)} \right)^2\]

source
LensFactory.Cosmology.Omega_wzFunction
Omega_wz(cosmology::AbstractCosmology, z::RV)

Calculates the dark energy density parameter $(\Omega_{w})$ at redshift z. The formula is,

\[Ω_{w}(z) = Ω_{w0} (1+z)^{3(1+w)} \left( \frac{H_0}{H(z)} \right)^2\]

source
LensFactory.Cosmology.Omega_kzFunction
Omega_kz(cosmology::AbstractCosmology, z::RV)

Calculates the curvature density parameter $(\Omega_{k})$ at redshift z. The formula is,

\[Ω_{k}(z) = Ω_{k0} (1+z)^2 \left( \frac{H_0}{H(z)} \right)^2\]

source

Distances

LensFactory.Cosmology.hubble_distanceFunction
hubble_distance(H0::RV)

Calculates HUbble distance (i.e., size of the observable Universe) $(D_H)$ in ${\rm \mathbf{meters}}$. The formula is

\[D_H = \frac{\rm c}{\rm H_0} \]

source
LensFactory.Cosmology.comoving_distance_radialFunction
comoving_distance_radial(cosmo::AbstractCosmology, zi::RV, zf::RV)

Calculates the comoving radial distance $(D_C)$ between $z_1$ and $z_2$ in ${\rm \mathbf{meters}}$. The formula is,

\[D_C = D_H \int_{z_1}^{z_2} \frac{dz'}{E(z')}\]

source
LensFactory.Cosmology.comoving_distance_transverseFunction
comoving_distance_transverse(cosmo::AbstractCosmology, zi::RV, zf::RV)

Calculates the comoving radial distance $(D_M)$ between, $z_1$ and $z_2$ in ${\rm \mathbf{meters}}$. The formula is,

\[D_M = \begin{cases} D_H \frac{1}{\sqrt{\Omega_k}} \sinh \left[ \sqrt{\Omega_k} \: D_C / D_H \right] & \text{if } \Omega_k > 0 \\ D_C & \text{if } \Omega_k = 0 \\ D_H \frac{1}{\sqrt{|\Omega_k|}} \sin \left[ \sqrt{|\Omega_k|} \: D_C / D_H \right] & \text{if } \Omega_k < 0 \\ \end{cases}\]

source
LensFactory.Cosmology.luminosity_distanceFunction
luminosity_distance(cosmology::AbstractCosmology, z::RV)

Calculates the luminosity distance $(D_L)$ to redshift $z$ in ${\rm \mathbf{meters}}$. The formula is,

\[D_L(z) = (1+z) D_M(z)\]

source
LensFactory.Cosmology.angular_diameter_distanceFunction
angular_diameter_distance(cosmology::AbstractCosmology, z1::RV, z2::RV)

Calculates the angular diameter distance $(D_A)$ between redshifts $z_1$ and $z_2$ in ${\rm \mathbf{meters}}$. The formula is,

\[D_A(z_1, z_2) = \frac{D_M(z_1, z_2)}{1+z_2}\]

source
LensFactory.Cosmology.distance_modulusFunction
distance_modulus(cosmo::AbstractCosmology, zf::RV)

Calculates the distance modulus $(\mu)$ to a given redshift $z$. The formula is,

\[\mu = 5 \log\left( \frac{D_L}{\rm pc} \right) - 5\]

source
LensFactory.Cosmology.angular_scaleFunction
angular_scale(cosmo::AbstractCosmology, zf::RV)

Calculates the angular size in ${\rm \mathbf{Kpc}}$ for $1''$ on sky at redhsift, $z$. The formula is

\[d = 1'' \times \left( \frac{D_A}{\rm{kpc}} \right)\]

source

Volumes

LensFactory.Cosmology.comoving_volume_elementFunction
comoving_volume_element(cosmology::AbstractCosmology, zf::RV)

Calculates the comving volume element $(dV_C)$ at redshift $z$ in ${\rm \mathbf{Gpc^3}}$. The formula is

\[dV_C = D_H \frac{D_M^2(z)}{E(z)}\]

source
LensFactory.Cosmology.comoving_volumeFunction
comoving_volume(cosmology::AbstractCosmology, zf::RV)

Calculates the total comving volume up to redshift $z$ in ${\rm \mathbf{Gpc^3}}$. The formula is,

\[V_C = \begin{cases} \frac{4π}{2} \frac{D_H^3}{Ω_k} \left[ \frac{D_M}{D_H} \sqrt{1+Ω_k \left(\frac{D_M}{D_H}\right)^2} - \frac{1}{\sqrt{|Ω_k|}} {\rm arcsinh}\left( \sqrt{|Ω_k|} \frac{D_M}{D_H} \right) \right] & \text{if } Ω_k > 0 \\ \frac{4π}{3} D_M^3 & \text{if } Ω_k = 0 \\ \frac{4π}{2} \frac{D_H^3}{|Ω_k|} \left[ \frac{D_M}{D_H} \sqrt{1+Ω_k \left(\frac{D_M}{D_H}\right)^2} - \frac{1}{\sqrt{|Ω_k|}} \arcsin\left( \sqrt{|Ω_k|} \frac{D_M}{D_H} \right) \right] & \text{if } Ω_k < 0 \\ \end{cases}\]

source