Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

appetrosyan/SuperCosmoChord

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperCosmoChord

https://travis-ci.org/williamjameshandley/CosmoChord.svg?branch=master https://zenodo.org/badge/158467573.svg

About

SuperCosmoChord
Supernest + PolyChord + CosmoMC for cosmological parameter estimation and evidence calculation
Authors
  • Will Handley (PolyChord and CosmoChord),
  • Aleksandr Petrosyan (Superpositional proposals),
  • Anthony Lewis (CosmoMC)
ForkedFrom
https://github.com/cmbant/CosmoMC
Homepage
http://polychord.co.uk

SuperCosmoChord is a fork of CosmoMC, which adds nested sampling provided by PolyChord, and uses superpositional proposal re-partitioning to accelerate the process.

Changes from CosmoMC

You can see the key changes by running:
git remote add upstream https://github.com/cmbant/CosmoMC
git fetch upstream
git diff --stat upstream/master
git diff  upstream/master source 

The changes to CosmoMC are minor:

  • Nested sampling heavily samples the tails of the posterior. This means that there need to be more corrections for these regions that are typically unexplored by the default metropolis hastings tool. This is now implemented by separate CAMB git submodule.
  • You should not use openmp parallelisation, as this in inefficient when using PolyChord. Instead, you should use pure MPI parallelisation, and you may use as many cores as you have live points.

Installation

SuperCosmoChord

git clone --recursive https://github.com/williamjameshandley/CosmoChord
cd CosmoChord
make
export OMP_NUM_THREADS=1
./cosmomc test.ini

If you wish to use Planck data, you should follow the CosmoMC planck instructions, and then run make clean; make; after — source bin/clik_profile.sh

Planck Likelihoods

As this is a fork of CosmoMC, the process of installing the Planck likelihoods is identical: - install prerequisites of Planck Code:
pip install cython astropy
  • install cfitsio and astropy. Most Linux distributions will have cfitsio in the official repositories. Consult your distribution’s package repositories.
  • Obtain the likelihood code and the baseline data from the Planck Legacy archive:
curl "http://pla.esac.esa.int/pla-sl/data-action?COSMOLOGY.COSMOLOGY_OID=151912" --output "COM_Likelihood_CODE-v3.0_R3.01.tar.gz"
curl "http://pla.esac.esa.int/pla-sl/data-action?COSMOLOGY.COSMOLOGY_OID=151902" --output "COM_Likelihood_Data-baseline_R3.00.tar.gz"
  • Alternatively, manually download COM_Likelihood_Code-*.tar.gz and COM-Likelihood_Data-*.tar.gz.
  • Unpack the code
tar xvfz COM_likelihood_Code*.tar.gz 
cd code/plc-3.0/plc-3.01/ 
  • install planck likelihood code with:
./waf configure --install_all_deps install

note that if this fails, the waf script will attempt to pull the dependencies from obsolete hardcoded locations. If this is the case, interrupt (Ctrl+c) and install the dependencies manually. See your linux distribution’s package catalogue to find the required libraries.

  • Set-up the environment variables. An example profile for bash is given in bin/clik_profile.sh. To avoid frustration, you may wish to source the profile at login, e.g. by adding source $(pwd)/bin/clik_profile.sh to your .bashrc.
  • Return to the CosmoChord’s root directory: cd ../../...
  • Unpack the baseline data
tar xvfz COM_Likelihood_Data-*.tar.gz
  • symlink into baseline data into CosmoChord/data.
ln -s baseline/plc3-0 data/clik_14.0
  • (re)-build CosmoChord
make rebuild

Usage

To run, you should add action=5 to your ini file, and include batch3/polychord.ini. Consider modifying test.ini.

About

Cosmological sampling with PolyChord + CosmoMC

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 41.0%
  • Jupyter Notebook 37.4%
  • Python 11.1%
  • Fortran 9.1%
  • TeX 1.2%
  • Makefile 0.1%
  • Other 0.1%