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 based on the algorithm described in Adams, Cresswell and Easther (2001) [BibTeX].
In 2014, ModeCode was generalised to deal with multifield scenarios and interfaced with PolyChord. The new version, MultiModeCode, is described in Price, Frazer, Xu, Peiris and Easther (2014) [BibTeX].

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


Histograms for the spectral index and running for N-quadratic inflation with equal-energy initial conditions (Phys. Rev. Lett. 112, 161302 (2014)) .


DOWNLOAD:  Details and git repository at

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)