CAMB Lecture
CAMB Lecture
CAMB Lecture
A general note
What will we do?
1. How to use the codes
❏ VirtualBox (https://www.virtualbox.org/wiki/Downloads)
❏ Vagrant (https://www.vagrantup.com/downloads.html)
❏ Or use the DockerToolbox (Mac and windows...I used this)
> cd Corfu2017/
> vagrant init cmbant/cosmobox
> vagrant up
Step 0.1: run cosmobox
Inside cosmobox you can download, compile the code as shown in few slides!
If you need further tools (e.g. plotting tools) you can get them as in any unix system
> sudo apt-get install gnuplot
On the workstations
We add issues in installing all the requirements there
Main references:
definitely too many to list, refer to the references section of the README
Outline
1. The black box approach: compiling and running
params.ini
Input cosmology
Cosmology calculators
And options
calls
calls
...fingers crossed!
Cosmology and options: params.ini
Cosmology and general options are passed to CAMB through the params.ini
(or through the python wrapper).
Cosmological parameters
(other parameters below)
Output control and accuracy Accuracy options: trade speed for
accurate calculations
http://camb.readthedocs.io/en/latest/CAMBdemo.html
Exercise:
“fit” the Planck data
Exercise:
Reproduce the Planck best fit!
● Use the marginalized values obtained analyzed temperature (Table 4 - fitst column) and
temperature+lensing (Table 4 second column) from the Planck 2015 parameter paper
to obtain CMB spectra
● use the data available on Google Drive (temperature and lensing data point)
These are taken from the LAMBDA website
params.ini
Input cosmology
Cosmology calculators
And options
calls
calls
To use CAMB in an external code: use CAMB, call CAMB_GetResults (see CosmoMC)
What’s in the files?
Utilities Cosmology Driver and params
● bessels.f90 ● camb.f90 ● inidriver.F90
● inifile.f90 ● cmbmain.f90 ● params.ini
● Matrix_utils.f90 ● cosmorec.f90
● subroutines.f90 ● equations.f90
● utils.F90 ● halofit.f90
● writefits.f90 ● hyrec.f90
● lensing.f90
● modules.f90
● power_tilt.f90
● recfast.f90
● reionization.90
● SeparableBispectrum.f90
A closer look at cosmology
Evolution and transfer : Recombination: CMB lensing:
● equations.f90 ● recfast.f90 ● lensing.f90
● equations_ppf.f90 ● cosmorec.f90
● hyrec.f90
1. EV%OutputTransfer
These functions contain the evolution used to compute P(k,z) for the given
choice of species. This is not transformed in spherical harmonics, thus Bessel
functions are not used here.
2. sources(1-3)
These terms are integrated together with the Bessel functions to obtain Cls
Transfer functions and P(k)
Starting from primordial power spectrum, evolved observables are computed in
terms of the transfer functions, e.g.
These are computed in equations and used in various parts of the code
Sources and CMB
To obtain Cls one has to integrate the source terms with the Bessel functions in k
and z (see Ingunn’s lecture). This is done in cmbmain.f90
Source_q are interpolations of the source term computed in equations.f90 multiplied by the bessel functions
Source terms: just to scare you
Background functions
Given the evolution computed in equations.f90 CAMB computes some relevant
functions that are used throughout the code and can be also called by external codes.
In module.f90 you can find for example all the routines computing the P(k).
You can also find several functions computing background quantities, e.g.
Cosmological parameters
What to do?
Basically follow one of the standard initial power parameters, e.g. k_0_scalar
This is an effect of models such as Unified Dark Matter models, see 1103.0234
● Call the subroutine in the relevant part of the codes (output and derivs
subroutines in equations_ppf.f90)