Modified Gravity extension of Halofit




MGHalofit is a modified gravity extension of the fitting formula for the matter power spectrum developed by Smith et al and improved by Takahashi et al. MGHalofit is implemented in MGCAMB, which is based on CAMB


Download MGHalofit




[1] Download a default CAMB (version Feb 2013).

[2] Download the following files and replace those in the default CAMB package,


[3] Compile the code (with equations_ppf.f90 instead of equations.f90) and try to make a test run to reproduce the figure on the top of this page (only the 


Since CAMB is evolving, at some point you have to build MGHalofit by yourself from a default CAMB following these instructions. 


[1] Download a default CAMB and change it to MGCAMB following the instructions here.

[2] Add in the Hu-Sawicki model to MGCAMB following this instruction

[3] Implement MGHalofit by changing various files following this instruction

[4] Compile the code and try to make a test run to reproduce the figure on the top of this page (only the curves)! 


Version history


November 2013

  The f(R) gravity (Hu-Sawicki model) version released. 



If you use the MGHalofit code, please kindly cite the following papers.


[1] The nonlinear power spectrum of modified gravity models I: f(R) gravity
      arXiv: 1311.1291

[2] Testing gravity with CAMB and CosmoMC

      Alireza Hojjati, Levon Pogosian, GBZ

      arXiv: 1106.4543


[3] Searching for modified growth patterns with tomographic surveys.

      GBZ, Levon Pogosian, Alessandra Silvestri and Joel Zylberberg

      arXiv: 0809.3791