Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Modified Growth with CAMB

This is the official repository for the MGCAMB v3.0 patch. Below there are an introduction to the code and the instructions to install and run the code. This new version of the code was introduced in the paper MGCAMB with massive neutrinos and dynamical Dark Energy

Table of contents

1. Introduction

Modified Growth with CAMB (MGCAMB) is a patch for the Einstein Boltzmann solver CAMB that intrdouces phenomenological Modifications of Growth (MG) along with dynamical Dark Energy (DE). It includes several phenomenological parametrizations. For instance:

  • the mu, gamma parametrization, defined as

  • the mu, Sigma parametrization, defined as

  • the Q,R parametrization, defined as

MGCAMB is implemented in the latest version of CosmoMC. The MGCosmoMC code can be found on this repository

Structure of the code

The new MGCAMB patch is structured as in the figure.

The parameters in params_MG.ini are used to run the code and follow the structure above. Please, note that dynamical DE is supported in the pure_MG_models.

Consistency of the code

The General Relativity (GR) limit of the code has been tested. The results below show the maximum error obtained in the CMB TT spectrum and matter power spectrum when using the MG equations (in the GR limit) to evolve the system:

For all GRtrans times, the systematic maximum error is below 0.1%. This is achieved by delaying the time at which the Radiation Streaming Approximation (RSA) is switched on. This slows down MGCAMB code with respect to the default CAMB code by a factor of two.


If you use MGCAMB for your scientific work, please cite the following papers:

as well as the original CAMB paper. The file MGCAMB_references.bib contains all the references mentioned above.

2. How to install

To install MGCAMB in your machine simply run

git clone
cd MGCAMB/src/
make camb

3. How to run

Run the code

To run MGCAMB, first modify the params_MG.ini file according to which models you want to analyze. Then run

./camb params.ini

Run the test suite

If you want to run the test suite to produce the consistency plots in our paper, then run

cd mgcamb_tests

4. What's new

With these new version of the code we implemented consistently massive neutrinos, see accuracy plots above, and dynamical dark energy.

Also, the code has been checked and restructured and updated to the CAMB 2018 version.

The MG and DE parametrizations along with the computation of the quantities related to the perturbations are introduced in the file mgcamb.f90.

5. Examples

6. Known Bugs

  • Fixed Bug in mu-sigma parametrization. MGCAMB_Gammadot from the mu-sigma parametrization was missing the omegaDE_t term.

  • Fixed. Bug in Hu-Sawicki f(R) gravity: MGCAMB_Mu and MGCAMB_Mudot functions had a wrong t1 term. Thanks to Ziad Sakr.

7. Authors List

Main Developer:

Original Code Developers:

Repo created and maintained by Alex Zucca. If you find any bugs in the code, please contact Alex Zucca at .


This is the official MGCAMB repository. Scroll down for information about MGCAMB.



No releases published


No packages published