ModeCode – Bayesian Parameter Estimation for Inflation

ModeCode [Mortonson, Peiris and Easther] provides a numerical solution of the perturbation equations and resulting spectrum for an arbitrary inflationary potentials and implement Bayesian parameter estimation for inflation.

ModeCode was based on code previously used in Peiris et al. (2003) [BibTeX] and Mortonson, Dvorkin, Peiris & Hu (2009) [BibTeX]. It is modelled on the algorithm described in Adams, Cresswell and Easther (2001) [BibTeX].

ModeCode has been generalised to MultiModeCode and interfaced with PolyChord — details and git repository at


Constraints on spectral parameters for natural inflation, assuming instant reheating (red) and general reheating (grey); arXiv:1007.4205



OLD VERSION: The initial version of ModeCode was interfaced with the Jan 2011 version of CosmoMC, in order to use ModeCode for parameter estimation; you may download the tarball of the old version directly below.

  1. README (with code use description and installation instructions)
  2. ModeCode tarball
  3. Tarball (>100 Mb) of MCMC results from arXiv:1007.4205 (code release paper)