![]() |
![]() |
![]() |
NumCosmo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
Cosmological Distances and TimesCosmological 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
);
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
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$.
|
final redshift $z_f$. |
Returns : |
a new NcDistance. |
nc_distance_ref ()
NcDistance * nc_distance_ref (NcDistance *dist
);
FIXME
|
a NcDistance. |
Returns : |
FIXME. [transfer full] |
nc_distance_prepare ()
void nc_distance_prepare (NcDistance *dist
,NcHICosmo *cosmo
);
FIXME
|
a NcDistance. |
|
a NcHICosmo. |
nc_distance_prepare_if_needed ()
void nc_distance_prepare_if_needed (NcDistance *dist
,NcHICosmo *cosmo
);
FIXME
|
FIXME, |
|
FIXME |
nc_distance_func0_new ()
NcmMSetFunc * nc_distance_func0_new (NcDistance *dist
,NcDistanceFunc0 f0
);
|
FIXME |
|
FIXME. [scope notified] |
Returns : |
FIXME. [transfer full] |
nc_distance_func1_new ()
NcmMSetFunc * nc_distance_func1_new (NcDistance *dist
,NcDistanceFunc1 f1
);
|
FIXME |
|
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()
].
|
a NcDistance. |
|
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)}.$$
|
a NcDistance. |
|
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}.$$
|
a NcDistance. |
|
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()
].
|
a NcDistance |
|
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()
].
|
a NcDistance. |
|
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$.
|
a NcDistance. |
|
a NcHICosmo. |
Returns : |
$l_A(z_\star)$. |
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$.
|
a NcDistance |
|
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}$.
|
a NcDistance. |
|
a NcHICosmo. |
|
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}$.
|
a NcDistance. |
|
a NcHICosmo. |
|
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}$.
|
a NcDistance. |
|
a NcHICosmo. |
|
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}$.
|
a NcDistance. |
|
a NcHICosmo. |
|
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.
|
a NcDistance. |
|
a NcHICosmo. |
|
redshift $z_{he}$ in our local frame. |
|
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()
].
|
a NcDistance. |
|
a NcHICosmo. |
|
redshift $z_{he}$ in our local frame. |
|
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}$].
|
a NcDistance. |
|
a NcHICosmo. |
|
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)
|
a NcDistance. |
|
a NcHICosmo. |
|
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)
|
a NcDistance. |
|
a NcHICosmo. |
|
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.
|
a NcDistance. |
|
a NcHICosmo. |
|
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}.
|
a NcDistance. |
|
a NcHICosmo. |
|
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).
|
a NcDistance. |
|
a NcHICosmo. |
|
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