Professional Documents
Culture Documents
Cosmological parameters
In this section I will describe to my understand, what are the cosmological
models? but more precisely, what are the cosmological parameters?, what
is the importance of constraint them and how we can do this?. In this
kind of questions we are going to understand why programs like CAMB and
CosmoMC are importants.
dr2
2 2 2 2 2 2 2 2
ds = dt + a(t) + r d + r sen d , (1)
1 r2
where we used spherical coordinates, a(t) is the scale factor which evolve
with time, also, is a constant which could be 1, 0 or -1 and tell us the
spacial curvature(see fig.??), this is, if the universe is closed( = 1),
open( = 1) or flat( = 0).
1
Figure 1: Shape of the universe
0ij = aa
gij , (3)
a
i0j = ji (4)
a
and
lij .
lij = (5)
We want to form the Einstein equations R 21 g R + g = 8GT
with c = 1, so now with the Christoffel Symbols we can compute the non-zero
Ricci Tensors, that are given by
ij + gij (2a 2 + a
Rij = R a) (6)
and
a
R00 = 3 . (7)
a
We have to note, that R ij = k(d 1)
gij where d is the dimension of the
matrix gij , in this case d = 3 so Rij = 2kgij .
2
Furthermore, we need to get the Ricci scalar,
a 2
a k
R=6 + + . (8)
a a2 a2
Now, with these equation calculated we can compute the Einstein equa-
tions, but before we have to define our stress-energy tensor, we set
T = ( + p)u u + pg . (9)
This way of define T is consistent with the cosmological principle, that
the universe is isotropic and homogeneous, u is the four velocity vector,
is the density of the universe and p is its pressure. Then, in a comoving
framework, that is a framework in which the observer moves with the fluid,
we can set u = (1, 0, 0, 0), then the stress-energy tensor is given by
O
T = (10)
O pa2 (t) gij
Thus, now we can form the Einstein equations, first G00 + g00 = 8GT00
leads to
a 2 + k
3 = 8G, (11)
a2
and from Gij + gij = 8GTij we get
a
k a 2
2 2 2 + = 8Gp (12)
a a a
These last equations, are the solutions of the Einstein equations.
Finally, applying the energy conservation law, from T;0 = 0(where ;
denotes covariant derivative) we obtain
d a
+ 3 (p + ) = 0. (13)
dt a
If we set an equation of state p = w we can solve (13) and then obtain
a33w . Then, for matter (w = 0) we have a3 and we can set
a 3
0
m = m0 (14)
a
Analogously, for radiation (w = 13 ) we have a4 and we can set
3
a 4
0
R = R0 (15)
a
This equations will be very important when we define the density param-
eters.
Now, we need to see fig. in order to imagine a far source of light from
us, imagine that the source is at a distance R and emitted a light ray at
a time te , then that light arrives to us at a time t0 , also, at another time
te + ce (where e is the wavelength of the light ray emitted and c is the speed
of light) other light ray is emitted and arrives to us at t0 + c0 where 0 is the
wavelength of the light ray that we observed here and it could be different
for the initial wavelength because of the expansion of the universe. Then,
both light rays departed practically at the same distance at arrive to us(we
are in the 0 coordinate in our reference frame), then we can set
0
Z t0 Z 0 Z t0 +
dt dr c dt
= = . (17)
te a(t) R 1 k2 te + ce a(t)
From here, with a little calculus, is not difficult to obtain
0
Z te + ce Z t0 +
dt c dt
= . (18)
te a(t) t0 a(t)
Then, we can suppose a(t) constant with values a(te ) and a(t0 )(this as-
sumption is very logically, because 109 m and c 109 m/s, this give us
4
a difference of time of 1018 s!) , then, we can solve, change
c
= 1 (where
is the frequency) and obtain
a(t0 ) e
= , (19)
a(te ) 0
but this is precisely a redshift equation! if a(t) increase for our source
of light, then decreases and that corresponds to a redshift, inversely, if
a(t) decreases, then increases and this case corresponds to a blueshift.
Furthermore, is convenient to define
a(t0 )
1+z , (20)
a(t)
where we dropped the e sub index for the time in which the light ray was
emitted.
One time defined an equation for the redshift, the next thing to do is
expand a(t) around a(t0 )(this is equivalent to set z nearly to 0), we get
we evaluated a(t)
a(t)
instead of the previous quantity, this is called the Hubble
parameter(is not evaluated at today) and is identifying by H.
z ' H0 d. (24)
5
This equation is the famous Hubbles law, this is, a proportional equiva-
lence between the redshift and the distance for the stars, that for many years
astronomers wanted to find, even until now. Is important to note that this
relation is only valid for small redshifts.
m + R + k + = 1. (30)
6
Also, is useful sometimes to split m into m = b + c for baryons and
cold dark matter, respectively.
dz
dt = p . (33)
H0 (1 + z) + k (1 + z)2 + m (1 + z)3 + R (1 + z)4
From this point, one need to integrate the last relation in order to obtain
1
the age of the universe, but for simplicity it is useful to define x = 1+z as a
change of variable and integrate from x = 0(when z ) to x = 1(when
z 0), that is, from the beginning until now. Doing these change we obtain
Z 1
1 dx
t0 = , (34)
H0 0 x + k x2 + m x3 + R x4
where t0 denotes the age of the universe, which its currently value is
approximately (13.7 0.2)109 years.
7
Figure 2: CosmoBox using VirtualBox and Vagrant
virtual computer that you can run and which has all the required packages
to use CAMB and CosmoMC.
Now, if you are in windows the next step is execute cmd.exe and then
change to the direction where you want to work with CAMB and CosmoMC,
then you have to write the following commands:
vagrant init cmbant/cosmobox
vagrant up
After this, VirtualBox must open and then you will have a virtual envi-
ronment where you can use CAMB and CosmoMC(see fig).
8
etc.
CAMB
Code for Anisotropies in the Microwave Background(CAMB) is a program
that works with data from the Cosmic Microwave Background(CMB) and
some input parameters in order to compute the spectra. For example, some
of the outputs that can be obtained by CAMB is the Power Spectrum of the
CMB(see fig.??).
9
The next thing to do is modify your makefile,you have to open makefile and
then you have to type the appropriate compiler for fortran in the sentence
F90C = compiler (in my case, F90C = gfortran). Then, you need to type the
command make in the terminal, if there is no error, then for a test run you
can type command ./camb params.ini.
Now, The way that we run the program is, first, we need to set our pa-
rameters in params.ini and then, in the same file, established the output
root that is where we indicated our output file. We can change this, in the
line output root = name of the output file(in my case, output root
= test) but is important to consider that every time we run the program,
CAMB will save the output file replacing the previous one if we do not change
the name in the output root.
One time we set our input, we can run CAMB writing in the termi-
nal the command ./camb params.ini and automatically the program must
compute several parameters(see fig.??). The output files will save in the
principal folder with extensions like lensedCls.dat, scalCls.dat, etc(in my
case, test scalCls.dat, for example).
Then, we have to plot the results, for CAMB, I use Gnuplot but this is
optional. With Gnuplot, you just have to type plot name of the out-
put file ...Cls.dat(in my case, plot test scalCls.dat, to obtain the power
spectrum), this command will just give you the plot, you can use more op-
tions to make a better plot(see fig5 and compare with figure ??).
10
Figure 4: run test with camb
CosmoMC
CosmoMC is Cosmological Monte Carlo, so like the name indicates, Cos-
moMC is a program that uses the Monte Carlo Method in order to compute
cosmological parameters with some uncertainty. Also, CosmoMC uses Cl
power spectrum calculations by CAMB.
Furthermore, in fig.6 you can see one part of the test.ini file that appears
in the principal folder of CosmoMC, here you can change the direction of
where you want to save the output file(in my case, chains) and the name
of the output file(in my case, prueba). Is important to consider that if you
11
(a) commands to plot (b) output plot
want to make another run, you have to change the file root or the previous
output file will be replaced.
12
Let us take a look at the first one, test.ini, this file is the principal file
that you use to run CosmoMC, because you have to set the command ./cos-
momc test.ini. In this file, as we can see in fig.??, all the data is included
in DEFAULT() files where the terms between parentheses are just the di-
rections of the files, then, you can enable this data or disable depending of
what data do you want to use. Is important to note, that in the line DE-
FAULT(batch2/common.ini) is indicated that you have to go to batch2
folder and then open common.ini because this file also contains useful infor-
mation.
Now, sometimes you have to modify several lines in common.ini but the
important thing is the line MPI Converge Stop = where you set a num-
13
ber for a convergence criteria, so this can be used to stop the CosmoMC
chains(see fig.??). Also, there is a line INCLUDE(params CMB defaults.ini)
that is the file that we use to set the cosmological parameters that we are
going to use and their values. The configuration to set values for the cosmo-
logical parameters in params CMB defaults.ini is shown in fig.??.
14
Figure 10: A view of the common.ini file
third parameter and the triangle plot, that is, a fancy form to show the re-
sults of several 2-D plots together. You can add all the above kind of plots
with their respective parameters in distparams.ini.
When you finished to properly modify distparams.ini you can run ./get-
dist distparams.ini in the terminal and then you need to install IDLE(using
python 2.7). When you have installed IDLE, then you can open the pro-
gram, then click in FILE, then click in OPEN, and then go to the direc-
tion that you typed in plot data dir = and selected a file that is .py, the
name of this file is the same that the name you used in file root = (see fig.
6). Then, a new open is going to open, in this new open you can press F5, if
there is no error the screen have to show you something like in fig.??.
Finally, you will have a pdf generated in your principal folder with the plots.
The other way to plot the results is GetDistGUI, easier and more inter-
active, in my particular case, the one I mostly prefer. To use GetDistGUI
you just have to type python/GetDistGUI.py in the terminal and then,
15
Figure 11: A view of GetDistGUI
a new window will be open(see fig.??). Is to easy to modify the options and
make a plot. Finally, you can save the plot in a .png file doing click on the
icon.
16