This code is meant to reproduce the calculations described in the paper "A new calculation of the recombination epoch", Seager, S., Sasselov, D. & Scott, D., 1999, ApJ, 523, L1 (astro-ph/9909275), which is a fast approximation to the detailed calculations described in "How exactly did the Universe become neutral?" Seager, S., Sasselov, D. & Scott, D., 2000, ApJS, 128, 407 (astro-ph/9912182). And with some updates (to He etc.) which are described in Wong, W.Y., Moss, A. & Scott, D., 2008, MNRAS, 386, 1023 (arXiv:0711.1357), together with the Compton coupling treatment in Scott, D. & Moss A., 2009, MNRAS, 397, 445 (arXiv:0902.3438).

It solves a modified 3-level atom for each of hydrogen and helium, along
with some corrections motivated by more detailed calculations. It is thus
*fast*, while being accurate enough for current CMB experiments.

Here are things that the code treats:

- Solves H and He simultaneously
- Kinetic temperature of matter evolved separately, including Compton and adiabatic cooling
- Careful consideration of dependency of quantities on
*T*_{M}and*T*_{R} - Accurate values of all relevant physical constants
- Full treatment of background cosmology, including radiation, Lambda
and curvature (but no explicit "
*w*") - Saha assumed for ionized helium
- Accurate look-up table for recombination coefficients
- Approximation for H recombination at low redshift, to account for out of equilibrium
- Singlet and triplet states considered for neutral He
- Additional "fudge factor" for He recombination
- Solves for temperature difference between matter and radiation,
giving smoother transition in
*T*_{M}evolution - Includes an extra "fudge" function to correct
*K*(*z*) to approximate the H physics corrections from detailed codes (see Rubino-Martin et al. 2010) - Extra "fudge factor" Gaussians, designed to make correction for additional He physics for cosmologies near the standard one

There are 2 separate versions of the code, one in

`fortran`

(developed by DS), and one in `C`

(developed by SS).
A bug has been fixed that caused overflow on some types of computer (Feb 2000).
Other minor bugs have also been noted and fixed. Some problems with
Helium recombination were also pointed out and corrected (June 2003).
Version 1.3 includes 3 minor corrections (value of *G*,
m_{He}/m_{H} ratio and an
error of *x* for `x_H`

in `f(1)`

).
Version 1.4 includes modifications to account for the effects of Helium,
especially the new fudge factor. `Heswitch`

should be set to
6 to include all the He effects. Version 1.5 includes a correction
to the optical depth in order to approximate the change in *x*_{e}
coming from additional H physics. `Hswitch`

should be set to 1
to include these new effects. Version 1.5.2 includes a change to the fudge
factors (including "fu") to match new He physics (see Chluba et al. 2012).

It is believed that the current version of recfast.for is sufficiently accurate
(i.e. effectively negligible bias on parameters) for use with *Planck*
data, for theories not too disimilar to the standard cosmology.

`C`

version.
The `C`

code, with `makefile`

etc. is available
here
and here.
The current version of the code links to Numerical Recipes (NR), which is
copyright - hence users will require their own NR library. Details of
the modifications to NR routines and how to link are fully explained at
these urls.
Translations of this page available in French and Polish.

Please e-mail any comments to

`C`

code)
Last revised: 30th September 2012