This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
forked from williamjameshandley/CosmoChord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rst.old
132 lines (88 loc) · 3.99 KB
/
README.rst.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
===================
SuperCosmoChord
===================
:CosmoChord: PolyChord + CosmoMC for cosmological parameter estimation and evidence calculation
:Author: Will Handley
:ForkedFrom: https://github.com/cmbant/CosmoMC
:Homepage: http://polychord.co.uk
.. image:: https://travis-ci.org/williamjameshandley/CosmoChord.svg?branch=master
:target: https://travis-ci.org/williamjameshandley/CosmoChord
.. image:: https://zenodo.org/badge/158467573.svg
:target: https://zenodo.org/badge/latestdoi/158467573
Description and installation
=============================
SuperCosmoChord is a fork of `CosmoMC
<https://github.com/cmbant/CosmoMC>`__, which adds nested sampling
provided by PolyChord, and uses superpositional proposal
re-partitioning to accelerate the process.
Installation procedure:
.. code:: bash
git clone --recursive https://github.com/williamjameshandley/CosmoChord
cd CosmoChord
make
export OMP_NUM_THREADS=1
./cosmomc test.ini
To run, you should add ``action=5`` to your ini file, and include
``batch3/polychord.ini``. Consider modifying ``test.ini``
If you wish to use Planck data, you should follow the `CosmoMC planck
instructions <https://cosmologist.info/cosmomc/readme_planck.html>`__,
and then run ``make clean; make``; after — ``source
bin/clik_profile.sh``
Changes from CosmoMC
====================
You can see the key changes by running:
.. code:: bash
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.
Planck Likelihoods
==================
As this is a fork of CosmoMC, the process of installing the Planck
likelihoods is identical:
- install prerequisites of Planck Code:
.. code:: bash
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 <http://pla.esac.esa.int/pla/#home>`__:
.. code:: bash
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
.. code:: bash
tar xvfz COM_likelihood_Code*.tar.gz
cd code/plc-3.0/plc-3.01/
- install planck likelihood code with:
.. code:: bash
./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
.. code:: bash
tar xvfz COM_Likelihood_Data-*.tar.gz
- symlink into baseline data into ``CosmoChord/data``.
.. code:: bash
ln -s baseline/plc3-0 data/clik_14.0
- (re)-build CosmoChord
.. code:: bash
make rebuild