A code to calculate the recombination history of the Universe

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:

This results in xe(z) producing (it is believed) better than 0.1 percent accuracy for CMB anisotropy Cl.

There are 2 separate versions of the code, one in fortran (developed by DS), and one in C (developed by SS).


Current version 1.5.2 (September 2012)

You can get recfast.for and recfast.readme here. You can also still get version1.5.0 (January 2010), version1.4.2 (September 2008), version1.4.1 (August 2008), as well as version1.3 (October 2006), version1.2 (June 2003) and version1.0 (October 2001).

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, mHe/mH 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 xe 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.


Note: this code is not currently up-to-date with bug fixes etc. It is only included for historical reasons and to help people who want to write their own 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.

Please e-mail any comments to dscott"AT" (or seager"AT" for C code)

Douglas Scott
Last revised: 30th September 2012