NcRecomb

NcRecomb — Abstract class for cosmic recombination.

Functions

NcRecomb * nc_recomb_ref ()
void nc_recomb_free ()
void nc_recomb_clear ()
void nc_recomb_prepare ()
void nc_recomb_prepare_if_needed ()
void nc_recomb_set_zi ()
void nc_recomb_require_zi ()
gdouble nc_recomb_get_zi ()
gdouble nc_recomb_Xe ()
gdouble nc_recomb_XHII ()
gdouble nc_recomb_XHeII ()
gdouble nc_recomb_HI_ion_saha ()
gdouble nc_recomb_HeI_ion_saha ()
gdouble nc_recomb_HeII_ion_saha ()
gdouble nc_recomb_HeII_ion_saha_x ()
gdouble nc_recomb_HeII_ion_saha_x_by_HeIII_He ()
gdouble nc_recomb_He_fully_ionized_Xe ()
gdouble nc_recomb_equilibrium_Xe ()
gdouble nc_recomb_equilibrium_XHI ()
gdouble nc_recomb_equilibrium_XHII ()
gdouble nc_recomb_equilibrium_XHeI ()
gdouble nc_recomb_equilibrium_XHeII ()
gdouble nc_recomb_equilibrium_XHeIII ()
gdouble nc_recomb_dtau_dx ()
gdouble nc_recomb_dtau_dlambda ()
gdouble nc_recomb_d2tau_dlambda2 ()
gdouble nc_recomb_d3tau_dlambda3 ()
gdouble nc_recomb_tau ()
gdouble nc_recomb_tau_drag ()
gdouble nc_recomb_tau_lambda0_lambda1 ()
gdouble nc_recomb_log_v_tau ()
gdouble nc_recomb_v_tau ()
gdouble nc_recomb_dv_tau_dlambda ()
gdouble nc_recomb_d2v_tau_dlambda2 ()
void nc_recomb_v_tau_lambda_features ()
gdouble nc_recomb_get_v_tau_max_lambda ()
gdouble nc_recomb_get_tau_lambda ()
gdouble nc_recomb_get_tau_drag_lambda ()
gdouble nc_recomb_get_tau_cutoff_lambda ()
gdouble nc_recomb_get_v_tau_max_z ()
gdouble nc_recomb_get_tau_z ()
gdouble nc_recomb_get_tau_drag_z ()
gdouble nc_recomb_get_tau_cutoff_z ()
gdouble nc_recomb_dtau_dlambda_Xe ()
gdouble nc_recomb_He_fully_ionized_dtau_dlambda ()

Properties

double init-frac Read / Write / Construct
double prec Read / Write / Construct
double zi Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── NcRecomb
        ├── NcRecombCBE
        ╰── NcRecombSeager

Includes

#include <numcosmo/nc_recomb.h>

Description

$ \newcommand{\He}{\text{He}} \newcommand{\HeI}{\text{HeI}} \newcommand{\HeII}{\text{HeII}} \newcommand{\HeIII}{\text{HeIII}} \newcommand{\Hy}{\text{H}} \newcommand{\HyI}{\text{HI}} \newcommand{\HyII}{\text{HII}} \newcommand{\e}{{\text{e}^-}} $

The NcRecomb abstract object describe a general recombination process. To describe the functions we have the following definitions, more details in Weinberg (2008).

We refer to the total number of hydrogen nucleus (ionized or not) as $n_{\Hy}$, the neutral hydrogen atoms as $n_{\HyI}$ and ionized hydrogen as $n_{\HyII}$ and, therefore, $n_{\HyI} + n_{\HyII} = n_{\Hy}$. Similarly, the number of helium nuclei is $n_{\He}$ and the neutral, single and double ionized are $n_{\HeI}$, $n_{\HeII}$ and $n_{\HeIII}$, respectively.

We also define the helium primordial abundance as the ratio of the helium mass to the total baryonic mass, i.e., \begin{align}\label{def:Yp} Y_p = \frac{n_{\He} m_{\He}}{(n_{\He} m_{\He} + n_{\Hy} m_{\Hy})}, \end{align} where $m_{\Hy}$ and $m_{\He}$ are the hydrogen and helium masses.

The element abundances are defined as the ratio of the element by the total number of free protons $n_p \equiv n_\Hy$: \begin{align} X_{f} = \frac{n_{f}}{n_p}, \end{align} where $f$ is any one of the elements described above and $\e$ represent the number of free electrons.

These fractions have the following properties: \begin{align}\label{eq:Hy:add} X_\HyI + X_{\HyII} &= 1, \\ \label{eq:He:add} X_{\HeI} + X_{\HeII} + X_{\HeIII} &= X_{\He}, \\ X_{\He} &\equiv \frac{m_p}{m_{\He}}\frac{Y_p}{1-Y_p}. \end{align} We also define the number of free electrons as $n_\e$. Assuming a neutral universe we have \begin{equation}\label{eq:def:Xe} X_\e = X_{\HyII} + X_{\HeII} + 2X_{\HeIII}. \end{equation}

Equilibrium fractions

Equilibrium ratio $X_{\HyII}X_\e / X_\Hy$ through Saha equation, i.e., \begin{equation}\label{eq:saha:HyI} \frac{X_{\HyII}X_\e}{X_\HyI} = \frac{e^{-\HyI_{1s}/(k_BT)}}{n_{\Hy}\lambda_{\e}^3}, \end{equation} where $\HyI_{1s}$ is the hydrogen $1s$ binding energy ncm_c_HI_ion_E_1s_2S0_5(), $\lambda_{\e}$ is the electron thermal wavelength, i.e., \begin{equation} \lambda_{\e} = \sqrt{\frac{2\pi\hbar^2}{m_\e{}k_BT}}, \end{equation} $k_K$ is the Boltzmann constant ncm_c_kb(), $m_\e$ the electron mass and $\hbar$ is the Planck constant ncm_c_hbar().

This calculation is done using the Saha equation as in Weinberg (2008).

The equilibrium single/non-ionized helium ratio $X_{\HeII}X_\e/X_{\HeI}$ through Saha equation, i.e., \begin{equation}\label{eq:saha:HeI} \frac{X_{\HeII}X_\e}{X_{\HeI}} = \frac{e^{-\HeI_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3}, \end{equation} where $\HeI_{1s}$ is the helium I $1s$ binding energy ncm_c_HeI_ion_E_1s_1S0(). This calculation is done using the Saha equation as in Seager (2000).

The equilibrium double/single-ionized helium ratio $X_{\HeIII}X_\e/X_{\HeII}$ through Saha equation, i.e., \begin{equation}\label{eq:saha:HeII} \frac{X_{\HeIII}X_\e}{X_{\HeII}} = \frac{e^{-\HeII_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3}, \end{equation} where $\HeII_{1s}$ is the helium II $1s$ binding energy ncm_c_HeII_ion_E_1s_2S0_5(). This calculation is done using the Saha equation as in Seager (2000).

The default value of the helium primordial abundance is given by nc_hicosmo_Yp_4He(). The primordial Helium fraction is define by nc_hicosmo_XHe().

Optical depth and visibility function

The derivative of the optical depth $\tau$ with respect to the redshift time $\lambda \equiv -\ln(x) = -\ln(1 + z)$ is \begin{equation}\label{eq:def:dtaudlambda} \frac{d\tau}{d\lambda} = -\frac{c\sigma_Tn_BX_\e}{H}, \end{equation} where $c$ is the speed of light [ncm_c_c()], $\sigma_T$ is the Thomson cross section [ncm_c_thomson_cs()], $n_B$ is the number density of baryons and $H$ the Hubble function. We define the optical depth $\tau$ integrating from the present time, i.e., \begin{equation}\label{eq:def:tau} \tau = \int_0^\lambda\frac{d\tau}{d\lambda}. \end{equation} Using the equations above we define the visibility function $v_\tau$ as \begin{equation}\label{eq:def:vtau} v_\tau = \frac{d\tau}{d\lambda}e^{-\tau}. \end{equation}

Functions

nc_recomb_ref ()

NcRecomb *
nc_recomb_ref (NcRecomb *recomb);

Increases the reference count of recomb .

Parameters

recomb

a NcRecomb

 

Returns

recomb .

[transfer full]


nc_recomb_free ()

void
nc_recomb_free (NcRecomb *recomb);

Decreases the reference count of recomb

Parameters

recomb

a NcRecomb

 

nc_recomb_clear ()

void
nc_recomb_clear (NcRecomb **recomb);

Decreases the reference count of *recomb if *recomb is not NULL, then sets *recomb to NULL.

Parameters

recomb

a NcRecomb

 

nc_recomb_prepare ()

void
nc_recomb_prepare (NcRecomb *recomb,
                   NcHICosmo *cosmo);

Prepares the object using the model cosmo .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

nc_recomb_prepare_if_needed ()

void
nc_recomb_prepare_if_needed (NcRecomb *recomb,
                             NcHICosmo *cosmo);

Prepares the object using the model cosmo if it was changed since last preparation.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

nc_recomb_set_zi ()

void
nc_recomb_set_zi (NcRecomb *recomb,
                  const gdouble zi);

Sets the initial redshift of the integration $[0, z_i]$.

Parameters

recomb

a NcRecomb

 

zi

initial redshift to prepare the recombination functions $z_i$

 

nc_recomb_require_zi ()

void
nc_recomb_require_zi (NcRecomb *recomb,
                      const gdouble zi);

Requires the initial redshift of at least $z_i$ = zi .

Parameters

recomb

a NcRecomb

 

zi

initial redshift to prepare the recombination functions $z_i$

 

nc_recomb_get_zi ()

gdouble
nc_recomb_get_zi (NcRecomb *recomb);

Parameters

recomb

a NcRecomb

 

Returns

the current initial redshift $z_i$.


nc_recomb_Xe ()

gdouble
nc_recomb_Xe (NcRecomb *recomb,
              NcHICosmo *cosmo,
              const gdouble lambda);

Calculates the value of $X_\e$ at lambda .

[virtual Xe]

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$X_\e$


nc_recomb_XHII ()

gdouble
nc_recomb_XHII (NcRecomb *recomb,
                NcHICosmo *cosmo,
                const gdouble lambda);

Calculates the value of $X_\HyII$ at lambda .

[virtual XHII]

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$X_\HyII$


nc_recomb_XHeII ()

gdouble
nc_recomb_XHeII (NcRecomb *recomb,
                 NcHICosmo *cosmo,
                 const gdouble lambda);

Calculates the value of $X_\HeII$ at lambda .

[virtual XHeII]

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$X_\HeII$


nc_recomb_HI_ion_saha ()

gdouble
nc_recomb_HI_ion_saha (NcHICosmo *cosmo,
                       const gdouble x);

Calculates the equilibrium ionized/non-ionized hydrogen abundance ratio $X_{\HyII}X_\e / X_{\HyI}$. See Eq. \eqref{eq:saha:HyI}.

Parameters

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

the abundance ratio $X_{\HyII}X_\e / X_{\HyI}$


nc_recomb_HeI_ion_saha ()

gdouble
nc_recomb_HeI_ion_saha (NcHICosmo *cosmo,
                        const gdouble x);

Calculates the equilibrium single/non-ionized helium ratio $X_{\HeII}X_\e/X_{\HeI}$. See Eq. \eqref{eq:saha:HeI}.

Parameters

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

the ratio $X_{\HeII}X_\e/X_{\HeI}$


nc_recomb_HeII_ion_saha ()

gdouble
nc_recomb_HeII_ion_saha (NcHICosmo *cosmo,
                         const gdouble x);

Calculates the equilibrium double/single ionized helium ratio ($X_{\HeIII}X_\e/X_{\HeII}$). See Eq. \eqref{eq:saha:HeII}.

Parameters

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

the ratio $X_{\HeIII}X_\e/X_{\HeII}$


nc_recomb_HeII_ion_saha_x ()

gdouble
nc_recomb_HeII_ion_saha_x (NcHICosmo *cosmo,
                           const gdouble f);

Calculates the redshift where the ratio $$X_{\HeIII}X_\e/X_{\HeII} = f.$$

This calculation is done by finding the value of $x$ where $$\frac{e^{-\HeII_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3} = f.$$

Parameters

cosmo

a NcHICosmo

 

f

$X_{\HeIII}X_\e/X_{\HeII}$

 

Returns

the value of $x$ where the ratio f occur


nc_recomb_HeII_ion_saha_x_by_HeIII_He ()

gdouble
nc_recomb_HeII_ion_saha_x_by_HeIII_He (NcHICosmo *cosmo,
                                       const gdouble f);

Calculates the redshift where the ratio $$X_{\HeIII}/X_{\He} = f.$$

This calculation is done assuming that hydrogen and helium are fully ionized, i.e., $\HyI = 0 = \HeI$. In this case $$\frac{X_{\HeIII}X_\e}{X_{\HeII}} = \frac{f}{1-f}\left[1 + X_\He(1+f)\right].$$

Parameters

cosmo

a NcHICosmo

 

f

value of $X_{\HeIII}/X_{\He}$

 

Returns

the value of $x$ where the ratio f occur


nc_recomb_He_fully_ionized_Xe ()

gdouble
nc_recomb_He_fully_ionized_Xe (NcHICosmo *cosmo,
                               const gdouble x);

Assuming that all helium is single or double ionized and all hydrogen is ionized, we have $$X_\e = 1 + X_\HeII + 2X_\HeIII,\quad X_\He = X_\HeII + X_\HeIII,$$ thus, $$X_\HeIII = X_\e-X_\He-1,\quad X_\HeII = 1 + 2X_\He - X_\e.$$ Using nc_recomb_HeII_ion_saha() and nc_hicosmo_XHe() we obtain $X_\e$.

Parameters

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\e$


nc_recomb_equilibrium_Xe ()

gdouble
nc_recomb_equilibrium_Xe (NcRecomb *recomb,
                          NcHICosmo *cosmo,
                          const gdouble x);

Calculates the ionization fraction $X_\e$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\e$


nc_recomb_equilibrium_XHI ()

gdouble
nc_recomb_equilibrium_XHI (NcRecomb *recomb,
                           NcHICosmo *cosmo,
                           const gdouble x);

Calculates the hydrogen-I fraction $X_\HyI$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\HyI$


nc_recomb_equilibrium_XHII ()

gdouble
nc_recomb_equilibrium_XHII (NcRecomb *recomb,
                            NcHICosmo *cosmo,
                            const gdouble x);

Calculates the hydrogen-II fraction $X_\HyII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\HyII$


nc_recomb_equilibrium_XHeI ()

gdouble
nc_recomb_equilibrium_XHeI (NcRecomb *recomb,
                            NcHICosmo *cosmo,
                            const gdouble x);

Calculates the helium-I fraction $X_\HeI$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\HyII$


nc_recomb_equilibrium_XHeII ()

gdouble
nc_recomb_equilibrium_XHeII (NcRecomb *recomb,
                             NcHICosmo *cosmo,
                             const gdouble x);

Calculates the helium-II fraction $X_\HeII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\HyII$


nc_recomb_equilibrium_XHeIII ()

gdouble
nc_recomb_equilibrium_XHeIII (NcRecomb *recomb,
                              NcHICosmo *cosmo,
                              const gdouble x);

Calculates the helium-III fraction $X_\HeIII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

x

redshift factor, $x = 1+z$

 

Returns

$X_\HyII$


nc_recomb_dtau_dx ()

gdouble
nc_recomb_dtau_dx (NcRecomb *recomb,
                   NcHICosmo *cosmo,
                   const gdouble lambda);

Computes the derivative of the optical depth with respect to $x = 1 + z$, $\frac{\mathrm{d}\tau}{\mathrm{d}x}$, at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left.\frac{\mathrm{d}\tau}{\mathrm{d}x}\right|_{\lambda}$


nc_recomb_dtau_dlambda ()

gdouble
nc_recomb_dtau_dlambda (NcRecomb *recomb,
                        NcHICosmo *cosmo,
                        const gdouble lambda);

Computes the derivative of the optical depth with respect to $\lambda$, $\frac{\mathrm{d}\tau}{\mathrm{d}\lambda}$, at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left.\frac{\mathrm{d}\tau}{\mathrm{d}\lambda}\right|_{\lambda}$


nc_recomb_d2tau_dlambda2 ()

gdouble
nc_recomb_d2tau_dlambda2 (NcRecomb *recomb,
                          NcHICosmo *cosmo,
                          const gdouble lambda);

Computes the second derivative of the optical depth with respect to $\lambda$, $\frac{\mathrm{d}^2\tau}{\mathrm{d}\lambda^2}$, at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left.\frac{\mathrm{d}^2\tau}{\mathrm{d}\lambda^2}\right|_{\lambda}$


nc_recomb_d3tau_dlambda3 ()

gdouble
nc_recomb_d3tau_dlambda3 (NcRecomb *recomb,
                          NcHICosmo *cosmo,
                          const gdouble lambda);

Computes the third derivative of the optical depth with respect to $\lambda$, $\frac{\mathrm{d}^3\tau}{\mathrm{d}\lambda^3}$, at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left.\frac{\mathrm{d}^3\tau}{\mathrm{d}\lambda^3}\right|_{\lambda}$


nc_recomb_tau ()

gdouble
nc_recomb_tau (NcRecomb *recomb,
               NcHICosmo *cosmo,
               const gdouble lambda);

Computes the optical depth [Eq. \eqref{eq:def:tau}] at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\tau$


nc_recomb_tau_drag ()

gdouble
nc_recomb_tau_drag (NcRecomb *recomb,
                    NcHICosmo *cosmo,
                    const gdouble lambda);

Computes the drag depth, $$\tau_d \equiv \int_0^\lambda \mathrm{d}\lambda R^{-1} \frac{n_e \sigma_T}{1+z},$$ where $R = \frac{3\bar{\rho}_b}{4\bar{\rho}_\gamma}$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\tau_\mathrm{drag}$


nc_recomb_tau_lambda0_lambda1 ()

gdouble
nc_recomb_tau_lambda0_lambda1 (NcRecomb *recomb,
                               NcHICosmo *cosmo,
                               const gdouble lambda0,
                               const gdouble lambda1);

Computes the optical depth between lambda1 and lambda0 .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda0

$\lambda_0$

 

lambda1

$\lambda_1$

 

Returns

$\tau(\lambda_1) - \tau(\lambda_0)$


nc_recomb_log_v_tau ()

gdouble
nc_recomb_log_v_tau (NcRecomb *recomb,
                     NcHICosmo *cosmo,
                     const gdouble lambda);

Computes the logarithm base e of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\log(v_\tau)$


nc_recomb_v_tau ()

gdouble
nc_recomb_v_tau (NcRecomb *recomb,
                 NcHICosmo *cosmo,
                 const gdouble lambda);

Computes the visibility function [Eq. \eqref{eq:def:vtau}] at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$v_\tau$


nc_recomb_dv_tau_dlambda ()

gdouble
nc_recomb_dv_tau_dlambda (NcRecomb *recomb,
                          NcHICosmo *cosmo,
                          const gdouble lambda);

Computes the derivative of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left. \frac{\mathrm{d}v_\tau}{\mathrm{d}\lambda}\right|_\lambda$


nc_recomb_d2v_tau_dlambda2 ()

gdouble
nc_recomb_d2v_tau_dlambda2 (NcRecomb *recomb,
                            NcHICosmo *cosmo,
                            const gdouble lambda);

Computes the second derivative of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda .

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$\left. \frac{\mathrm{d}^2v_\tau}{\mathrm{d}\lambda^2}\right|_\lambda$


nc_recomb_v_tau_lambda_features ()

void
nc_recomb_v_tau_lambda_features (NcRecomb *recomb,
                                 NcHICosmo *cosmo,
                                 gdouble logref,
                                 gdouble *lambda_max,
                                 gdouble *lambda_l,
                                 gdouble *lambda_u);

Calculates the maximum of the visibility function [Eq \eqref{eq:def:vtau}], i.e, the value of $\lambda_\text{max}$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$, and the values where the visibility drops to $v_\tau(\lambda_\text{max})e^{-\text{logref}}$ to the left $\lambda_l$ and to the right $\lambda_u$ of $\lambda_\text{max}$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

logref

the logarithm of the reference scale

 

lambda_max

$\lambda_\text{max}$.

[out]

lambda_l

$\lambda_l$.

[out]

lambda_u

$\lambda_u$.

[out]

nc_recomb_get_v_tau_max_lambda ()

gdouble
nc_recomb_get_v_tau_max_lambda (NcRecomb *recomb,
                                NcHICosmo *cosmo);

Calculates the maximum of the visibility function [Eq. \eqref{eq:def:vtau}], the value of $\lambda_\text{max}$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$\lambda_\text{max}$


nc_recomb_get_tau_lambda ()

gdouble
nc_recomb_get_tau_lambda (NcRecomb *recomb,
                          NcHICosmo *cosmo);

Calculates the value of $\lambda$ where the optical depth [Eq \eqref{eq:def:tau}] is equal to one, i.e., $\tau(\lambda^\star) = 1$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$\lambda^\star$


nc_recomb_get_tau_drag_lambda ()

gdouble
nc_recomb_get_tau_drag_lambda (NcRecomb *recomb,
                               NcHICosmo *cosmo);

Calculates the value of $\lambda$ where the optical depth times $R$ [Eq. \eqref{eq:def:tau}] is equal to one, i.e., $\tau_\mathrm{drag}(\lambda^\star) = 1$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$\lambda^\star$


nc_recomb_get_tau_cutoff_lambda ()

gdouble
nc_recomb_get_tau_cutoff_lambda (NcRecomb *recomb,
                                 NcHICosmo *cosmo);

Calculates the value of $\lambda$ where the optical depth [Eq \eqref{eq:def:tau}] attains a value such that $e^{-\tau(\lambda_\text{cutoff})} = \epsilon_\text{double}$, i.e., equal to the smallest value of a double which add to one.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$\lambda_\text{cutoff}$


nc_recomb_get_v_tau_max_z ()

gdouble
nc_recomb_get_v_tau_max_z (NcRecomb *recomb,
                           NcHICosmo *cosmo);

Calculates the maximum of the visibility function [Eq. \eqref{eq:def:vtau}], the value of $z(\lambda_\text{max})$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$z(\lambda_\text{max})$


nc_recomb_get_tau_z ()

gdouble
nc_recomb_get_tau_z (NcRecomb *recomb,
                     NcHICosmo *cosmo);

Calculates the value of $z(\lambda)$ where the optical depth [Eq \eqref{eq:def:tau}] is equal to one, i.e., $\tau(\lambda^\star) = 1$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$z(\lambda^\star)$


nc_recomb_get_tau_drag_z ()

gdouble
nc_recomb_get_tau_drag_z (NcRecomb *recomb,
                          NcHICosmo *cosmo);

Calculates the value of $z(\lambda)$ where the optical depth times $R$ (drag depth) [Eq. \eqref{eq:def:tau}] is equal to one, i.e., $\tau_\mathrm{drag}(\lambda^\star) = 1$.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$z(\lambda^\star)$


nc_recomb_get_tau_cutoff_z ()

gdouble
nc_recomb_get_tau_cutoff_z (NcRecomb *recomb,
                            NcHICosmo *cosmo);

Calculates the value of $z(\lambda)$ where the optical depth [Eq \eqref{eq:def:tau}] attains a value such that $e^{-\tau(\lambda_\text{cutoff})} = \epsilon_\text{double}$, i.e., equal to the smallest value of a double which add to one.

Parameters

recomb

a NcRecomb

 

cosmo

a NcHICosmo

 

Returns

$z(\lambda_\text{cutoff})$


nc_recomb_dtau_dlambda_Xe ()

gdouble
nc_recomb_dtau_dlambda_Xe (NcHICosmo *cosmo,
                           const gdouble lambda);

The derivative of the optical depth [Eq. \eqref{eq:def:dtaudlambda}] over the ionization fraction $X_\e$ [Eq. \eqref{eq:def:Xe}].

Parameters

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$X_\e^{-1}d\tau/d\lambda$


nc_recomb_He_fully_ionized_dtau_dlambda ()

gdouble
nc_recomb_He_fully_ionized_dtau_dlambda
                               (NcHICosmo *cosmo,
                                const gdouble lambda);

The derivative of the optical depth [Eq. \eqref{eq:def:dtaudlambda}], considering fully ionized helium and hydrogen [nc_recomb_He_fully_ionized_Xe()].

Parameters

cosmo

a NcHICosmo

 

lambda

$\lambda = - \ln(1+z)$

 

Returns

$d\tau/d\lambda$

Types and Values

NC_RECOMB_STARTING_X

#define NC_RECOMB_STARTING_X (1.0e12)

Property Details

The “init-frac” property

  “init-frac”                double

Initial fraction to start numerical integration.

Owner: NcRecomb

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 1e-11


The “prec” property

  “prec”                     double

The precision used in the calculations.

Owner: NcRecomb

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 1e-07


The “zi” property

  “zi”                       double

Initial redshift to prepare the recombination functions.

Owner: NcRecomb

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1e+12