Berkeley Cosmology Code Index
Here we provide links and information on publicly available codes useful for the cosmology research community. Please send suggestions/additions/corrections by opening an issue on github or through our contact page.
Boltzmann codes for cosmological perturbations.
Boltzmann codes input cosmological parameters and return predictions the cosmic microwave background, the [non-]linear matter power spectrum, and possibly other observables as well.
-
camb
- Online help: cosmocoffee
- Language: Fortran 90
- Dependencies: None
- References: CAMB notes and the readme
- Features:
- CAMB sources "for number counts, lensing and dark-age 21cm power spectra, plus thermal history, perturbed recombination, CMB cross-correlations"
- Integrated with CosmoMC for cosmological parameter estimation.
- Notes: well-tested and widely used; can be difficult to modify.
-
CLASS
- Online help: github
- Language: C with Python and C++ wrappers.
- Dependencies: None
- References: 8 papers; cite this paper at least.
- Features:
- ClassGAL: computes power spectrum and correlation function in linear perturbation theory with all relativistic corrections.
- Integrated with Monte Python for cosmological parameter estimation.
Parameter Estimation Algorithms.
Cosmologists frequently estimate joint constraints on nuisance parameters and the cosmological parameters of interest. There are many algorithms in use to efficiently sample the parameter space; a non-exhaustive list focused on cosmology applications is provided here.
- Metropolis-Hastings
- Affine Invariant Markov chain Monte Carlo Ensemble sampler
- Algorithm described in Goodman and Weare
- Implemented in emcee
- Implemented in CosmoHammer; see their paper for an example using cosmic microwave background data.
- Multimodal nested sampling
- Implemented in Multinest: a Bayesian inference tool which calculates the evidence and explores the parameter space which may contain multiple posterior modes and pronounced (curving) degeneracies in moderately high dimensions.
- References:
- Open source version (in progress): nestle
- Implemented in Polychord, tailored for high dimensional parameter spaces with arbitrary degeneracies and multimodality. It utilizes slice sampling at each iteration to sample within the hard likelihood constraint of nested sampling.
- References:
- Diffusive nested sampling combines nested sampling with Markov Chain Monte Carlo; excellent in lower dimensional spaces.
- Population Monte-Carlo
- References:
- Implemented in CosmoPMC
- Hamiltonian Monte Carlo (or Hybrid Monte Carlo)
- References:
- Applied to very high dimensional (~10^6) parameter space in Bayesian physical reconstruction of initial conditions from large scale structure surveys
- Additional references:
- Handbook of Markov Chain Monte Carlo
- Efficient sampling of fast and slow cosmological parameters. Describes a method for decorrelating fast and slow parameters, illustrated on the Planck likelihood and currently implemented in CosmoMC.
- A more comprehensive list of Markov chain Monte Carlo (MCMC) algorithms available in a public R package, LaplacesDemon.
- Comparison of sampling techniques for Bayesian parameter estimation. This paper compares Metropolis-Hasting sampling, nested sampling and affine-invariant ensemple MCMC sampling on both toy likelihoods and the WMAP 7-year likelihood.
Parameter Estimation Cosmology Codes.
- CosmoMC
- CosmoHammer
- CosmoSIS
- Cosmo++
-
Monte Python
- Metropolis-Hastings
- Nested Sampling (through Multinest)
- EMCEE (through CosmoHammer)
- Importance Sampling
- CosmoPMC