Cosmological Distances and Times

Cosmological Distances and Times — Calculate cosmological distances and related quantities.

Synopsis

gdouble             (*NcDistanceFunc0)                  (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             (*NcDistanceFunc1)                  (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
struct              NcDistanceClass;
struct              NcDistance;
NcDistance *        nc_distance_new                     (gdouble z_f);
NcDistance *        nc_distance_ref                     (NcDistance *dist);
void                nc_distance_prepare                 (NcDistance *dist,
                                                         NcHICosmo *cosmo);
void                nc_distance_prepare_if_needed       (NcDistance *dist,
                                                         NcHICosmo *cosmo);
void                nc_distance_free                    (NcDistance *dist);
void                nc_distance_clear                   (NcDistance **dist);
NcmMSetFunc *       nc_distance_func0_new               (NcDistance *dist,
                                                         NcDistanceFunc0 f0);
NcmMSetFunc *       nc_distance_func1_new               (NcDistance *dist,
                                                         NcDistanceFunc1 f1);
gdouble             nc_distance_hubble                  (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_decoupling_redshift     (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_drag_redshift           (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_shift_parameter_lss     (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_comoving_lss            (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_acoustic_scale          (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_Omega_k                 (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_angular_diameter_curvature_scale
                                                        (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_comoving                (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_transverse              (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_luminosity              (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_modulus                 (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_luminosity_hef          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z_he,
                                                         gdouble z_cmb);
gdouble             nc_distance_modulus_hef             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z_he,
                                                         gdouble z_cmb);
gdouble             nc_distance_shift_parameter         (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_dilation_scale          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_bao_A_scale             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_sound_horizon           (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_dsound_horizon_dz       (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_bao_r_Dv                (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_cosmic_time             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_lookback_time           (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_conformal_time          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_conformal_lookback_time (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);
gdouble             nc_distance_cosmic_time_mks_scale   (NcDistance *dist,
                                                         NcHICosmo *cosmo);
gdouble             nc_distance_conformal_time_mks_scale
                                                        (NcDistance *dist,
                                                         NcHICosmo *cosmo);

Object Hierarchy

  GObject
   +----NcDistance

Properties

  "zf"                       gdouble               : Read / Write / Construct

Description

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

The Hubble scale is simply defined as the inverse of the Hubble function $H(z)$ [nc_hicosmo_H()], \begin{equation}\label{eq:def:DH} D_H(z) = \frac{c}{H(z)}, \qquad D_{H0} = \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()]. The comoving distance $D_c$ is defined as \begin{equation}\label{eq:def:Dc} D_c(z) = \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} Note that both quantities are adimensional, in other words, one can think them as in units of the Hubble scale today.

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_k()]. Using the definition above we have that the luminosity distance is \begin{equation}\label{eq:def:Dl} D_l = (1+z)D_t(z), \end{equation} and the distance modulus is given by \begin{equation}\label{eq:def:mu} \mu(z) = 5\log_{10}(D_l(z)) + 25, \end{equation} where $\log_{10}$ represents the logarithm in the decimal base. Note that the distance modulus is usually defined as $$5\log_{10}(D_{H0}D_l(z)/\text{pc}) - 5,$$ where $\text{pc}$ is parsec [ncm_c_pc()]. Thus, this differs from our definition by a factor of $5\log_{10}(D_{H0}/\text{Mpc})$, where $\text{Mpc}$ is megaparsec [ncm_c_Mpc()].

Details

NcDistanceFunc0 ()

gdouble             (*NcDistanceFunc0)                  (NcDistance *dist,
                                                         NcHICosmo *cosmo);

NcDistanceFunc1 ()

gdouble             (*NcDistanceFunc1)                  (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

struct NcDistanceClass

struct NcDistanceClass {
};

struct NcDistance

struct NcDistance;

nc_distance_new ()

NcDistance *        nc_distance_new                     (gdouble z_f);

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

z_f :

final redshift $z_f$.

Returns :

a new NcDistance.

nc_distance_ref ()

NcDistance *        nc_distance_ref                     (NcDistance *dist);

FIXME

dist :

a NcDistance.

Returns :

FIXME. [transfer full]

nc_distance_prepare ()

void                nc_distance_prepare                 (NcDistance *dist,
                                                         NcHICosmo *cosmo);

FIXME

dist :

a NcDistance.

cosmo :

a NcHICosmo.

nc_distance_prepare_if_needed ()

void                nc_distance_prepare_if_needed       (NcDistance *dist,
                                                         NcHICosmo *cosmo);

FIXME

dist :

FIXME,

cosmo :

FIXME

nc_distance_free ()

void                nc_distance_free                    (NcDistance *dist);

FIXME

dist :

a NcDistance.

nc_distance_clear ()

void                nc_distance_clear                   (NcDistance **dist);

FIXME

dist :

a NcDistance.

nc_distance_func0_new ()

NcmMSetFunc *       nc_distance_func0_new               (NcDistance *dist,
                                                         NcDistanceFunc0 f0);

dist :

FIXME

f0 :

FIXME. [scope notified]

Returns :

FIXME. [transfer full]

nc_distance_func1_new ()

NcmMSetFunc *       nc_distance_func1_new               (NcDistance *dist,
                                                         NcDistanceFunc1 f1);

dist :

FIXME

f1 :

FIXME. [scope notified]

Returns :

FIXME. [transfer full]

nc_distance_hubble ()

gdouble             nc_distance_hubble                  (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

Returns :

$D_{H0}$.

nc_distance_decoupling_redshift ()

gdouble             nc_distance_decoupling_redshift     (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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

This function computes $z_\star$ using [nc_hicosmo_z_lss()], if cosmo implements it, or using Hu & Sugiyama fitting formula Hu (1996), $$ z_\star = 1048 \left(1 + 1.24 \times 10^{-3} (\Omega_b h^2)^{-0.738}\right) \left(1 + g_1 (\Omega_m h^2)^{g_2}\right),$$ where $\Omega_b h^2$ [nc_hicosmo_Omega_bh2()] and $\Omega_m h^2$ [nc_hicosmo_Omega_mh2()] are, respectively, the baryonic and matter density parameters times the square of the dimensionless Hubble parameter $h$, $H_0 = 100 \, h \, \text{km/s} \, \text{Mpc}^{-1}$. The parameters $g_1$ and $g_2$ are given by $$g_1 = \frac{0.0783 (\Omega_b h^2)^{-0.238}}{(1 + 39.5 (\Omega_b h^2)^{0.763})} \; \text{and} \; g_2 = \frac{0.56}{\left(1 + 21.1 (\Omega_b h^2)^{1.81}\right)}.$$

dist :

a NcDistance.

cosmo :

a NcHICosmo.

Returns :

$z_\star$

nc_distance_drag_redshift ()

gdouble             nc_distance_drag_redshift           (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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

This function computes $z_d$ using the fitting formula given in Eisenstein & Hu (1998), $$z_d = \frac{1291 (\Omega_m h^2)^{0.251}}{(1 + 0.659 (\Omega_m h^2)^{0.828})} \left(1 + b_1 (\Omega_b h^2)^{b_2}\right),$$ where $\Omega_b h^2$ [nc_hicosmo_Omega_bh2()] and $\Omega_m h^2$ [nc_hicosmo_Omega_mh2()] are, respectively, the baryonic and matter density parameters times the square of the dimensionless Hubble parameter $h$, $H_0 = 100 \, h \, \text{km/s} \, \text{Mpc}^{-1}$. The parameters $b_1$ and $b_2$ are given by $$b_1 = 0.313 (\Omega_m h^2)^{-0.419} \left(1 + 0.607 (\Omega_m h^2)^{0.674}\right) \; \text{and} \; b_2 = 0.238 (\Omega_m h^2)^{0.223}.$$

dist :

a NcDistance.

cosmo :

a NcHICosmo.

Returns :

$z_d$.

nc_distance_shift_parameter_lss ()

gdouble             nc_distance_shift_parameter_lss     (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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

dist :

a NcDistance

cosmo :

a NcHICosmo

Returns :

$R(z_\star)$.

nc_distance_comoving_lss ()

gdouble             nc_distance_comoving_lss            (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

Returns :

$D_c(z_\star)$.

nc_distance_acoustic_scale ()

gdouble             nc_distance_acoustic_scale          (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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 both computed at $z_\star$.

dist :

a NcDistance.

cosmo :

a NcHICosmo.

Returns :

$l_A(z_\star)$.

nc_distance_Omega_k ()

gdouble             nc_distance_Omega_k                 (NcDistance *dist,
                                                         NcHICosmo *cosmo);

nc_distance_angular_diameter_curvature_scale ()

gdouble             nc_distance_angular_diameter_curvature_scale
                                                        (NcDistance *dist,
                                                         NcHICosmo *cosmo);

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$.

dist :

a NcDistance

cosmo :

a NcHICosmo

Returns :

$D_a(z_\star)$.

nc_distance_comoving ()

gdouble             nc_distance_comoving                (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$D_c(z)$.

nc_distance_transverse ()

gdouble             nc_distance_transverse              (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$D_t(z)$.

nc_distance_luminosity ()

gdouble             nc_distance_luminosity              (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$D_l(z)$.

nc_distance_modulus ()

gdouble             nc_distance_modulus                 (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$\mu(z)$.

nc_distance_luminosity_hef ()

gdouble             nc_distance_luminosity_hef          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z_he,
                                                         gdouble z_cmb);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z_he :

redshift $z_{he}$ in our local frame.

z_cmb :

redshift $z_{CMB}$ in the CMB frame.

Returns :

$D_l(z_{hef},z_{CMB})$.

nc_distance_modulus_hef ()

gdouble             nc_distance_modulus_hef             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z_he,
                                                         gdouble z_cmb);

Calculate the distance modulus using the frame corrected luminosity distance [nc_distance_luminosity_hef()].

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z_he :

redshift $z_{he}$ in our local frame.

z_cmb :

redshift $z_{CMB}$ in the CMB frame.

Returns :

$\mu(z_{hef},z_{CMB})$.

nc_distance_shift_parameter ()

gdouble             nc_distance_shift_parameter         (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$R(z)$.

nc_distance_dilation_scale ()

gdouble             nc_distance_dilation_scale          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

The dilation scale is the cube root of the product of the radial dilation times the square of the transverse dilation -- (arXiv:astro-ph/0501171)

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$D_V(z)$.

nc_distance_bao_A_scale ()

gdouble             nc_distance_bao_A_scale             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

Bao 'A' scale D_v(z) sqrt(Omega_m) / z -- (arXiv:astro-ph/0501171)

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

the redshift $z$.

Returns :

FIXME

nc_distance_sound_horizon ()

gdouble             nc_distance_sound_horizon           (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

Compute the sound horizon $r_s$, \begin{equation} r_s (z) = \int_{z}^\infty \frac{c_s(z^\prime)}{E(z^\prime)} dz^\prime, \end{equation} where $c_s(z)$ is the speed of sound wave and $E(z)$ is the normalized Hubble function [nc_hicosmo_E()].

The integrand is given by \begin{equation}\label{eq:def:rs:integrand} \frac{c_s(z^\prime)}{H(z^\prime)} = \frac{1}{\sqrt{E(z^\prime)^2 (3 + \frac{9}{4} (1 + 0.2271 n_{eff}) \frac{\Omega_b}{\Omega_r (1 + z^\prime)})}}, \end{equation} where $n_{eff}$ is the effective number of neutrinos [ncm_c_neutrino_n_eff()], $\Omega_b$ [nc_hicosmo_Omega_b()] and $\Omega_r$ [nc_hicosmo_Omega_r()] are the baryonic and radiation density parameter, respectively. If $\Omega_r = 0$, the integrand returns 0.0.

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$r_s(z)$.

nc_distance_dsound_horizon_dz ()

gdouble             nc_distance_dsound_horizon_dz       (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

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(z) / E(z)$ is given by Eq. \eqref{eq:def:rs:integrand}.

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

redshift $z$.

Returns :

$\frac{d r_s(z)}{dz}$.

nc_distance_bao_r_Dv ()

gdouble             nc_distance_bao_r_Dv                (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

r(z_d) / D_v(z) -- (arXiv:0705.3323).

dist :

a NcDistance.

cosmo :

a NcHICosmo.

z :

the redshift $z$.

Returns :

FIXME

nc_distance_cosmic_time ()

gdouble             nc_distance_cosmic_time             (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

nc_distance_lookback_time ()

gdouble             nc_distance_lookback_time           (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

nc_distance_conformal_time ()

gdouble             nc_distance_conformal_time          (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

nc_distance_conformal_lookback_time ()

gdouble             nc_distance_conformal_lookback_time (NcDistance *dist,
                                                         NcHICosmo *cosmo,
                                                         gdouble z);

nc_distance_cosmic_time_mks_scale ()

gdouble             nc_distance_cosmic_time_mks_scale   (NcDistance *dist,
                                                         NcHICosmo *cosmo);

nc_distance_conformal_time_mks_scale ()

gdouble             nc_distance_conformal_time_mks_scale
                                                        (NcDistance *dist,
                                                         NcHICosmo *cosmo);

Property Details

The "zf" property

  "zf"                       gdouble               : Read / Write / Construct

Final cached redshift.

Allowed values: >= 0

Default value: 10