Method

NumCosmoDistancesound_horizon

Declaration [src]

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

Description [src]

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()].

Parameters

cosmo

Type: NcHICosmo

A NcHICosmo.

The data is owned by the caller of the method.
z

Type: const gdouble

Redshift $z$.

Return value

Type: gdouble

$r_s(z)$.