------------------ ==== ModeCode ==== ------------------ ReadMe for modecode_mn -- MultiNest enabled version. June 2012. M.J. Mortonson, H.V. Peiris, and R. Easther, arXiv:1007.4205 R. Easther and H. Peiris, arXiv:1112.0326 J. Norena, C. Wagner, L. Verde, H. Peiris, and R. Easther, arXiv:1202.0304 In this ReadMe "ModeCode" refers to the Multinest enabled version of ModeCode. ModeCode computes the primordial scalar and tensor power spectra for models of inflation. It can be run as a standalone code, or combined with CAMB to compute CMB angular power spectra and CosmoMC+Multinest to perform likelihood analysis and constrain parameters of inflationary models. ModeCode is integrated with the nested sampling package MultiNest, and permits both parameter estimation and the computation of Bayesian evidence. The code can be downloaded at: http://zuserver2.star.ucl.ac.uk/~hiranya/ModeCode/ModeCode/ Multinest can be obtained here: http://ccpforge.cse.rl.ac.uk/gf/project/multinest/ CosmoMC can be obtained here: http://cosmologist.info/cosmomc/ Version history: ---------------- June 2012 - added Hubble slow roll reconstruction to the choice of potentials, see arXiv:1202.0304; updated to Jan2012 version of cosmomc/CAMB. December 4, 2011 - updated to interface with MultiNest, adds priors on post-inflationary dynamics, computation of Bayesian Evidence. February 17, 2011 - fixed bug with output of derived parameters when sampling from priors, added params_modpk_F.paramnames for running code with use_modpk=F. (available as modecode.tar.gz) February 10, 2011 - updated to January 2011 version of CAMB. July 21, 2010 - initial release. The currently available files are: (1) modecode_mn.tar.gz, including the following directories: - cosmomc/ - sample files for running CosmoMC with ModeCode + Multinest - cosmomc/camb/ - sample driver for standalone code (driver_modpk.f90), new files used by ModeCode, and modified CAMB files - cosmomc/source/ - modified CosmoMC code - cosmomc/multinest/ - multinest source - Models/*/ - files for running CosmoMC with the Multinest sampler for the 7 models included in ModeCode (note that additional models can be easily added as described below), where * = m2phi2 (quadratic potential), lphi4 (quartic), neq1 (n=1), neq2ov3 (n=2/3), natural, hilltop, and reconstruction (Hubble slow-roll reconstruction). In addition there is a distparams_modpk.paramnames file corresponding to each model, which must be included via the parameter_names variable when running getdist. As usual, *.tar.gz files can be unzipped and extracted using the command 'tar -xzvf *.tar.gz'. The current version of the code is based on the January 2012 version of CAMB and CosmoMC and the April 2011 Multinest. Only new or modified CAMB/CosmoMC files are provided in the downloads, so any applications beyond using the standalone version of ModeCode will require adding the downloaded files to an existing copy of the basic CAMB and CosmoMC codes. In each of the modified files, changes to the original code are marked by 'MODIFIED P(K) ... END MODIFIED P(K)' so that they can be easily located. ==== Setting up and compiling ModeCode ==== After extracting files from modecode_mn.tar.gz, the ModeCode files must be copied into existing versions of CAMB/CosmoMC for use with those codes. One easy way to do this is to start in the cosmomc/ directory for the ModeCode files, and use 'cp -r . cosmomc_target/' where cosmomc_target is the base directory for the unmodified code. *** Note that this will overwrite original versions of some of the CAMB/CosmoMC files; if you do not want this to happen, rename the files first before copying (they will also need to be renamed in the Makefiles). *** Once the new and modified code files have been copied into the appropriate directories, the ModeCode versions of CAMB and CosmoMC can be compiled with the usual Makefiles, after adjusting the compiler options in the camb/Makefile and source/Makefile supplied with ModeCode to work on your system. You will also need to supply any likelihood codes (e.g. WMAP) that do not ship with the standard CAMB/CosmoMC. Executing the make command in the source directory will produce the executables cosmomc_multinest AND cosmomc. The cosmomc_multinest must be used to compute evidence with the multinest sampler. To compile the sample driver program for the standalone version of ModeCode without compiling CAMB or CosmoMC, run 'make powspec' in the camb/ directory. ==== General description of ModeCode parameters and options ==== Inflationary models are described in ModeCode using an array of parameters for the potential V(phi), vparams(i) for i = 1, 2, etc., and the parameter N_pivot (not used for HSR models, see below), which accounts for the uncertainty in the post-inflationary epoch between the inflation and reheating. N_pivot is the number of inflationary e-folds remaining when the mode of a given scale infl_pivot_k exits the horizon. The value of infl_pivot_k can be specified in units of Mpc^{-1}. ----------------- ModeCode options: ----------------- - use_modpk (logical): a general flag to turn ModeCode on or off. Setting use_modpk=F recovers the original functionality of CAMB/CosmoMC while retaining the Multinest sampler. When running the code with use_modpk=F, ParamNamesFile in params_modpk.ini should be changed to params_modpk_F.paramnames. - modpk_physical_priors (logical) Excludes models where the scalar spectral amplitude is vastly different from the observed value. As implemented, this cut excludes models who which 10^-11