Class

NumCosmoDistance

Description [src]

class NumCosmo.Distance : GObject.Object
{
  /* No available fields */
}

Cosmological distance and time related quantities.

This object implements several distances used in cosmology, here we have the following definitions.

$ \newcommand{\RH}{{R_H}} \newcommand{\RHc}{{R^\mathrm{c}_H}} $

The Hubble radius (or scale) is defined as the inverse of the Hubble function $H(z)$ [nc_hicosmo_H()], \begin{equation}\label{eq:def:RHc} \RH = \frac{c}{H(z)}, \qquad \RH_0 = \frac{c}{H_0}, \end{equation} where $c$ is the speed of light [ncm_c_c()], $z$ is the redshift and $H_0 \equiv H(0)$ is the Hubble parameter [nc_hicosmo_H0()]. Similarly, we also define the comoving Hubble radius as \begin{equation}\label{eq:def:DH} \RHc(z) = \frac{c}{aH(z)} = \frac{c(1+z)}{a_0H(z)}, \qquad \RHc_0 = \frac{c}{a_0H_0} \end{equation} where ${}_0$ subscript means that the function is calculated at the present time and the redshift $z$ is defined by the expression $$1 + z = \frac{a_0}{a}.$$

The comoving distance $D_c$ is defined as \begin{equation}\label{eq:def:dc} d_c(z) = \RHc_0\int_0^z \frac{dz^\prime}{E (z^\prime)}, \end{equation} where $E(z)$ is the normalized Hubble function [nc_hicosmo_E()], i.e., \begin{equation}\label{eq:def:Ez} E(z) \equiv \frac{H(z)}{H_0}. \end{equation}

In this object we will compute the dimensionless version of the distances, for the comoving distance we define \begin{equation}\label{eq:def:Dc} D_c(z) \equiv \frac{d_c(z)}{\RHc_0}. \end{equation} note, however, that $D_c(z)$ coincides with the proper distance today $r(z) \equiv a_0 d_c(z)$ in unit of the Hubble radius, i.e., $D_c(z) = r(z) / \RH_0$. Therefore, both the comoving distance and the proper distance today can be obtained by multiplying $D_c(z)$ by $\RHc_0$ and $\RH_0$ respectively.

The transverse comoving distance $D_t$ and its derivative with respect to $z$ are given by \begin{equation}\label{eq:def:Dt} D_t(z) = \frac{\sinh\left[\sqrt{\Omega_{k0}}D_c(z)\right]}{\sqrt{\Omega_{k0}}}, \qquad \frac{dD_t}{dz}(z) = \frac{\cosh\left[\sqrt{\Omega_{k0}}D_c(z)\right]}{E(z)}, \end{equation} where $\Omega_{k0}$ is the value of the curvature today [nc_hicosmo_Omega_k0()]. Using the definition above we have that the luminosity and angular diameter distances are respectively: \begin{equation}\label{eq:def:Dl} D_l = (1 + z)D_t(z), \qquad D_A = D_t (z) / (1 + z), \end{equation} and the distance modulus is given by \begin{equation}\label{eq:def:dmu} \delta\mu(z) = 5\log_{10}(D_l(z)) + 25. \end{equation} Note that the distance modulus is defined as $$\mu(z) = 5\log_{10}[\RH_0D_l(z)/(1\,\text{Mpc})] + 25.$$ Thus, this differs from our definition by a factor of $5\log_{10}[\RH_0/(1\,\text{Mpc})]$, i.e., $$\mu(z) = \delta\mu(z) + 5\log_{10}[\RH_0/(1\,\text{Mpc})],$$ where $\text{Mpc}$ is megaparsec [ncm_c_Mpc()].

We also implement the following distances between $z_1$ and $z_2$: \begin{align}\label{eq:def:Dt12} D_t(z_1, z_2) &= \frac{\sinh\left\{\sqrt{\Omega_{k0}}\left[D_c(z_2)-D_c(z_1)\right]\right\}}{\sqrt{\Omega_{k0}}}, \ \label{eq:def:DA12} D_A(z_1, z_2) &= D_t (z_1, z_2) / (1 + z_2). \end{align}.

Ancestors

Constructors

nc_distance_new

Creates a new NcDistance object optimized to perform distance calculations to redshift up to zf.

Functions

nc_distance_angular_diameter_from_Dc

Computes the angular diameter distance from the comoving distance $D_c$, curvature parameter $\Omega_k$, and redshift $z$. This is the _from_Dc version that works directly with distances rather than cosmology objects.

nc_distance_clear

Atomically decrements the reference count of dist by one. If the reference count drops to 0, all memory allocated by dist is released. Set pointer to NULL.

nc_distance_luminosity_from_Dc

Computes the luminosity distance from the comoving distance $D_c$, curvature parameter $\Omega_k$, and redshift $z$. This is the _from_Dc version that works directly with distances rather than cosmology objects.

nc_distance_radial_volume_integral_from_Dc

Computes the integral of the squared transverse comoving distance, $$ V(D_c, \Omega_k) = \int_0^{D_c} \left[\frac{\mathrm{sinn}(\sqrt{|\Omega_k|}\chi’)}{\sqrt{|\Omega_k|}}\right]^2 d\chi’, $$ where $\mathrm{sinn}(x) = \sinh(x)$ for $\Omega_k > 0$ (open universe), $\mathrm{sinn}(x) = \sin(x)$ for $\Omega_k < 0$ (closed universe), and $\mathrm{sinn}(x) = x$ for $\Omega_k = 0$ (flat universe).

nc_distance_transverse_from_Dc

Computes the transverse comoving distance from the comoving distance $D_c$ and curvature parameter $\Omega_k$. This is the _from_Dc version that works directly with distances rather than redshifts.

Instance methods

nc_distance_DA_r

Computes the ratio between the angular-diameter distance and the sound horizon at the drag epoch, $$\frac{D_A(z)}{c \, r_s(z_d)}.$$.

nc_distance_DH_r

Computes the ratio between the Hubble (distance) radius and the sound horizon at the drag epoch, $$\frac{R_H}{r_s(z_d)} = \frac{c}{H(z) r_d}.$$.

nc_distance_Dt_r

Computes the ratio between the transverse distance and the sound horizon at the drag epoch, $$\frac{D_t(z)}{c \, r_s(z_d)}.$$.

nc_distance_acoustic_scale

Compute the acoustic scale $l_A (z_\star)$ at $z_\star$ [nc_distance_decoupling_redshift()], \begin{equation} l_A(z_\star) = \pi \frac{D_t (z_\star)}{r_s (z_\star)}, \end{equation} where $D_t(z_\star)$ is the comoving transverse distance [nc_distance_transverse()] and $r_s(z_\star)$ is the sound horizon [nc_distance_sound_horizon()] both computed at $z_\star$.

nc_distance_angular_diameter

Compute the angular diameter $D_A(z)$, defined in Eq. $\eqref{eq:def:Dl}$.

nc_distance_angular_diameter_array

Compute the angular diameter distance $D_A(z)$ for each redshift in z.

nc_distance_angular_diameter_curvature_scale

We define the angular diameter curvature scale $D_a(z_\star)$ as $$D_a(z_\star) = \frac{E(z_\star)}{1 + z_\star} D_t(z_\star),$$ where $z_\star$ is the decoupling redshift, given by [nc_distance_decoupling_redshift()], $E(z_\star)$ is the normalized Hubble function [Eq. $\eqref{eq:def:Ez}$] and $D_t(z_\star)$ is the transverse comoving distance [Eq. $\eqref{eq:def:Dt}$] both computed at $z_\star$.

nc_distance_angular_diameter_vector

Compute the angular diameter distance $D_A(z)$ for each redshift in z.

nc_distance_angular_diameter_z1_z2

Compute the angular diameter $D_A(z_1, z_2)$, defined in Eq. $\eqref{eq:def:DA12}$.

nc_distance_bao_A_scale

This function returns the BAO $A$ parameter. It is defined as $$ A \equiv D_V (z) \frac{\sqrt{\Omega_{m0} H_0^2}}{z c},$$ where $\Omega_{m0}$ is the matter density parameter [nc_hicosmo_Omega_m0()], $c$ is the speed of light [ncm_c_c()], $H_0$ is the Hubble parameter [nc_hicosmo_H0()] and $D_V(z)$ is the dilation scale [nc_distance_dilation_scale()]. See Section 4.5 from [Eisenstein et al. (2005)][XEisenstein2005] [arXiv].

nc_distance_bao_r_Dv

This function computes $r(z_d) / D_V(z)$, where $r(z_d)$ is given by nc_distance_r_zd() and $D_V(z)$ by nc_distance_dilation_scale(). For more information see [Percival et al. (2007)][XPercival2007] [arXiv].

nc_distance_comoving

Calculate the comoving distance $D_c (z)$ as defined in Eq. $\eqref{eq:def:Dc}$.

nc_distance_comoving_array

Compute the comoving distance $D_c(z)$ for each redshift in z.

nc_distance_comoving_lss

Compute the comoving distance $D_c(z)$ [Eq. \eqref{eq:def:Dc}] at the decoupling redshift $z_\star$ [nc_distance_decoupling_redshift()].

nc_distance_comoving_vector

Compute the comoving distance $D_c(z)$ for each redshift in z.

nc_distance_comoving_volume_element

This function computes the comoving volume element per unit solid angle $d\Omega$ given z, namely, $$\frac{\mathrm{d}^2V}{\mathrm{d}z\mathrm{d}\Omega} = \frac{D_t^2(z)}{E(z)} = \frac{(1 + z)^2 D_a^2(z)}{E(z)},$$ where $E(z)$ is the normalized Hubble function and $D_t$ is the transverse comoving distance (and $D_a$ is the angular diameter distance).

nc_distance_comoving_volume_radial_integral

Computes the comoving volume radial integral from redshift $z$ using the comoving distance and spatial curvature from the cosmology.

nc_distance_comoving_z1_z2

Compute the comoving distance between $z_1$ and $z_2$, $D_c (z_1, z_2)$.

nc_distance_comoving_z_to_infinity

Computes the comoving distance from z to infinity.

nc_distance_compute_inv_comoving

Enable/Disable the computation of $z(\xi)$.

nc_distance_conformal_lookback_time

This function computes the conformal look-back time $\eta_{lb}(z)$. Within the chosen units it becomes the same as the comoving distance [nc_distance_comoving()], given in Eq. $\eqref{eq:def:dc}$.

nc_distance_conformal_time

This function computes the cosmological conformal time $\eta(z)$ defined as $$ \eta(z) = \int_z^\infty \frac{dz}{E(z)} \, . $$.

nc_distance_cosmic_time

This function computes the cosmological time, $t(z)$, defined as \begin{equation} t(z) = \int_z^{\infty} \frac{dx}{(1+x)E(x)}. \end{equation}.

nc_distance_decoupling_redshift

The decoupling redshift $z_\star$ corresponds to the epoch of the last scattering surface of the cosmic microwave background photons.

nc_distance_dilation_scale

The dilation scale is the spherically averaged distance for perturbations along and orthogonal to the line of sight, $$D_V(z) = \left[D_{H_0}^2 D_t(z)^2 \frac{cz}{H(z)} \right]^{1/3},$$ where $D_t(z)$ is the transverse comoving distance [Eq. $\eqref{eq:def:Dt}$], $c$ is the speed of light [ncm_c_c()] and $H(z)$ is the Hubble function [nc_hicosmo_H()]. See [Eisenstein et al. (2005)][XEisenstein2005] [arXiv].

nc_distance_dmodulus

Compute the distance modulus $\delta\mu(z)$ defined in Eq. $\eqref{eq:def:dmu}$.

nc_distance_dmodulus_array

Compute the distance modulus $\delta\mu(z)$ for each redshift in z.

nc_distance_dmodulus_hef

Calculate the distance modulus [Eq. $\eqref{eq:def:dmu}$] using the frame corrected luminosity distance [nc_distance_luminosity_hef()].

nc_distance_dmodulus_vector

Compute the angular diameter distance $D_A(z)$ for each redshift in z.

nc_distance_drag_redshift

Drag redshift is the epoch at which baryons were released from photons.

nc_distance_dsound_horizon_dz

Calculate the sound horizon [nc_distance_sound_horizon()] derivative with respect to $z$, $$\frac{d r_s(z)}{dz} = - \frac{c_s(z)}{E(z)}\, ,$$ where $c_s = \sqrt{c^{b\gamma 2}_s(z)}$ is the baryon-photon plasma speed of sound (see nc_hicosmo_bgp_cs2() for more details) and $E(z)$ is the normalized Hubble function [nc_hicosmo_E()].

nc_distance_dtransverse_dz

Compute the derivative of $D_t(z)$ with respect to $z$ defined in Eq. $\eqref{eq:def:Dt}$.

nc_distance_free

Atomically decrements the reference count of dist by one. If the reference count drops to 0, all memory allocated by dist is released.

nc_distance_hubble

Calculate the curvature scale today as defined in Eq $\eqref{eq:def:DH}$ in units of megaparsec (Mpc) [ncm_c_Mpc()].

nc_distance_inv_comoving

Computes the inverse of $\xi(z)$.

nc_distance_lookback_time

This functions computes the look-back time, $t_{lb}(z)$, defined as.

nc_distance_luminosity

Compute the luminosity distance $D_l(z)$ defined in Eq. $\eqref{eq:def:Dl}$.

nc_distance_luminosity_array

Compute the luminosity distance $D_L(z)$ for each redshift in z.

nc_distance_luminosity_hef

Calculate the luminosity distance $D_l$ corrected to our local frame.

nc_distance_luminosity_vector

Compute the luminosity distance $D_t(z)$ for each redshift in z.

nc_distance_max_comoving_distance
No description available.

nc_distance_prepare

This function prepares the object dist using cosmo, such that all the available distances functions can be evaluated, e.g. nc_distance_comoving().

nc_distance_prepare_if_needed

This function prepares the object dist using cosmo if it was changed since last preparation.

nc_distance_r_zd

This function computes the sound horizon [nc_distance_sound_horizon ()] at the drag redshift [nc_distance_drag_redshift()].

nc_distance_r_zd_Mpc

Similar as nc_distance_r_zd(), but now in units of $\mathrm{Mpc}$, i.e., $ R_H \times r(z_d)$.

nc_distance_ref

Increases the reference count of dist atomically.

nc_distance_require_zf

Requires the final redshift of at least zf.

nc_distance_set_recomb

This function sets recomb into dist.

nc_distance_shift_parameter

The shift parameter $R(z)$ is defined as \begin{equation} R(z) = \frac{\sqrt{\Omega_{m0} H_0^2}}{c} (1 + z) D_A(z) = \sqrt{\Omega_{m0}} D_t(z), \end{equation} where $\Omega_{m0}$ is the matter density paremeter [nc_hicosmo_Omega_m0()], $D_A(z) = D_{H_0} D_t(z) / (1 + z)$ is the angular diameter distance and $D_t(z)$ is the transverse comoving distance [Eq. $\eqref{eq:def:Dt}$].

nc_distance_shift_parameter_lss

Compute the shift parameter $R(z)$ [nc_distance_shift_parameter()] at the decoupling redshift $z_\star$ [nc_distance_decoupling_redshift()].

nc_distance_sigma_critical

Computes the critical surface density, \begin{equation}\label{eq:def:SigmaC} \Sigma_c = \frac{c^2}{4\pi G} \frac{D_s}{D_l D_{ls}}, \end{equation} where $c^2$ is the speed of light squared [ncm_c_c2 ()], $G$ is the gravitational constant in units of $m^3/s^2 M_\odot^{-1}$ [ncm_c_G_mass_solar()], $D_s$ ($D_l$) is the angular diameter distance from the observer to the source (lens), and $D_{ls}$ is the angular diameter distance between the lens and the source.

nc_distance_sigma_critical_infinity

Computes the critical surface density, \begin{equation}\label{eq:def:SigmaC} \Sigma_c = \frac{c^2}{4\pi G} \frac{D_\infty}{D_l D_{l\infty}}, \end{equation} where $c^2$ is the speed of light squared [ncm_c_c2 ()], $G$ is the gravitational constant in units of $m^3/s^2 M_\odot^{-1}$ [ncm_c_G_mass_solar()], $D_\infty$ ($D_l$) is the angular diameter distance from the observer to the source at infinite redshift (lens), and $D_{l\infty}$ is the angular diameter the lens and the source.

nc_distance_sound_horizon

Compute the sound horizon $r_s$, \begin{equation} \theta_s (z) = \int_{z}^\infty \frac{c_s(z^\prime)}{E(z^\prime)} dz^\prime, \quad r_s (z) = \frac{\mathrm{sinn}\left(\sqrt{\Omega_{k0}}\theta_s\right)}{\sqrt{\Omega_{k0}}}, \end{equation} where $c_s = \sqrt{c^{b\gamma 2}_s(z)}$ is the baryon-photon plasma speed of sound (see nc_hicosmo_bgp_cs2() for more details) and $E(z)$ is the normalized Hubble function [nc_hicosmo_E()].

nc_distance_theta100CMB

Compute the $100\theta_\mathrm{CMB}$ angle at $z_\star$ [nc_distance_decoupling_redshift()], \begin{equation} 100\theta_\mathrm{CMB} = 100 \times \frac{r_s (z_\star)}{D_t (z_\star)}, \end{equation} where $D_t(z_\star)$ is the comoving transverse distance [nc_distance_transverse()] and $r_s(z_\star)$ is the sound horizon [nc_distance_sound_horizon()] both both computed at $z_\star$.

nc_distance_transverse

Compute the transverse comoving distance $D_t (z)$ defined in Eq. $\eqref{eq:def:Dt}$.

nc_distance_transverse_array

Compute the transverse comoving distance $D_t(z)$ for each redshift in z.

nc_distance_transverse_vector

Compute the transverse distance $D_t(z)$ for each redshift in z.

nc_distance_transverse_z1_z2

Compute the transverse comoving distance between $z_1$ and $z_2$, $D_t (z1, z2)$ defined in Eq. $\eqref{eq:def:Dt12}$.

nc_distance_transverse_z_to_infinity

Compute the transverse comoving distance $D_t (z)$ (defined in Eq. $\eqref{eq:def:Dt}$) but from z to infinity.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmo.Distance:compute-inv-comoving
No description available.

NumCosmo.Distance:recomb

The recombination object, NcRecomb, used by NcDistance.

NumCosmo.Distance:zf

The final redshift to compute cosmological distances and related quantities.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct NumCosmoDistanceClass {
  /* no available fields */
}

No description available.