4.1. Before starting¶
The problem is set up through a .ini
file containing the parameters,
priors, model type, data files to be used and tex strings for plotting.
The program creates a folder in the working directory with the same name of
this .ini
file, if not already existing.
Another folder is created with the date and time for the output of each run of
the code, but you can always continue a previous run from where it stopped,
just giving the folder name instead of the .ini
file.
The folder epic
is the root of the project.
The python codes are in the EPIC
source folder, where the .ini
files should
also be placed.
The default working directory is the EPIC
’s parent directory, i.e., the
epic
repository folder.
Changing the default working directory¶
By default, the folders with the name of the .ini
files are created at the
repository root level.
But the chains can get very long and you might want to have them stored in a
different drive.
In order to set a new default location for all the new files, run:
python define_altdir.py
This will ask for the path of the folder where you want to save all the output
of the program and keep this information in a file altdir.txt
.
If you want to revert this change you can delete the altdir.txt
file or run
again the command above and leave the answer empty when prompted.
The parameters names¶
Each cosmological parameter already implemented has a name to be used in the
code that must be respected in the .ini
file.
The table below lists some of the parameters, their definitions and their names in the
program.
Parameter | Description | Name |
---|---|---|
\(h\) | Reduced Hubble constant | h |
\(\Omega_{b0} h^2\) | Physical baryonic density parameter | Obh2 |
\(\Omega_{c0} h^2\) | Physical cold dark matter density parameter | Och2 |
\(\Omega_{r0} h^2\) | Physical radiation density parameter | Orh2 |
\(\Omega_{b0}\) | Baryonic density parameter | Ob0 |
\(\Omega_{c0}\) | Cold dark matter density parameter | Oc0 |
\(\Omega_{m0}\) | Matter (baryons plus DM) density parameter | Om0 |
\(\Omega_{d0}\) | Dark energy density parameter | Oc0 |
\(w_d\) | Dark energy equation-of-state parameter | w or wd |
The structure of the .ini
file¶
Let us work with an example, with a simple flat \(\Lambda\text{CDM}\) model.
Suppose we want to constrain its parameters with \(H(z)\), supernovae data,
CMB shift parameters and BAO data.
The model parameters are the reduced Hubble constant \(h\), the present-day
values of the physical density parameters of dark matter \(\Omega_{c0} h^2\),
baryons \(\Omega_{b0} h^2\) and radiation \(\Omega_{r0} h^2\).
We will not consider perturbations, we are only constraining the parameters at
the background level.
Since we are using supernovae data we must include a nuisance parameter
\(M\), which represents a shift in the absolute magnitudes of the
supernovae.
It is also possible to use the full JLA catalogue with this program. In this
case, we would have to include also the nuisance parameters \(\alpha\),
\(\beta\) and \(\Delta M\) from the light-curve fit.
The first section of the LCDM.ini
file defines the priors and at the same
time the names of the parameters.
They must be inserted in the following form:
## PRIORS
h 0.6 0.8 4e-4
Och2 0.08 0.20 2e-4
Obh2 0.01 0.08 5e-5
Orh2 4e-5 8e-5 2e-7
M -0.3 0.3 2e-3 nuisance
## end of priors
Delimiting lines are mandatory: the line defining the beginning of the priors
section must contain the word PRIORS
.
The priors are read until the word end
is found.
The first column are the names of the parameters in the code.
The second and third columns set the flat priors intervals.
The fourth column is optional.
Gaussian priors are also supported. In this case, one should add gaussian
at the end of the line.
The second and third values will then be the Gaussian parameters \(\mu\) and
\(\sigma\) instead.
It gives the standard deviation for each parameter in the covariance of the
proposal function.
The values will vary according to the problem but a first guess can be 1/10 or
other small fraction of the prior interval.
Notice that the nuisance parameter is signaled as such by the word nuisance
at the end of the line.
To remove a parameter, you can just comment out its line with the character
#
.
If the parameter removed is necessary for the model predictions then a default
value will be assumed.
After the priors come the type of the model, needed to select the proper
functions in the calculation of model predictions, and a display name, both
with identifiers MODEL
and NAME
.
They are signaled in the .ini
file in the same way of the priors, but since
they are single-line the final delimiter is not needed:
## MODEL
lcdm
## NAME
$\Lambda$CDM
The class model could also be wcdm
for a \(w\text{CDM}\) model, of
which \(\Lambda\text{CDM}\) is a special case.
Omitting the dark energy equation of state parameter would automatically set it
to -1.
Notice that the use of \(\LaTeX\) input is allowed in the model name.
Next is the list of observables to be used, with the filename or directory with
the data.
The list is read until an occurrence of end
is found:
## DATA files
JLAsimple jla_likelihood_v4
Planck2015_distances Planck2015_LCDM
BAO BAO-6dF+SDSS+BOSS+Lyalpha+WiggleZ.txt
CosmicChrono thirtypointsHz.txt
## end of data
Finally, tex strings must be given to be used in the plots:
## TEX REPRESENTATION
h h
Och2 \Omega_{c0}h^2
Obh2 \Omega_{b0}h^2
Orh2 \Omega_{r0}h^2
Oc0 \Omega_{c0}
Ob0 \Omega_{b0}
Or0 \Omega_{r0}
Od0 \Omega_{d0}
Om0 \Omega_{m0}
M \Delta{M}
# end of tex
Here, strings for the derived parameters are also needed.
The tex strings should not contain any spaces.
If you need to separate a tex command from a following variable, use {}
instead, as is done for the last parameter in this example.
Also note that the first column needs to be consistent with the names given in
the priors and also in the parameters_names.txt
dictionary.
To summarize, we end up with the LCDM.ini
file in the EPIC
folder
looking like this:
## PRIORS
h 0.6 0.8 4e-4
Och2 0.08 0.20 2e-4
Obh2 0.01 0.08 5e-5
Orh2 4e-5 8e-5 2e-7
M -0.3 0.3 2e-3 nuisance
## end of priors
## MODEL
lcdm
## NAME
$\Lambda$CDM
## DATA files
JLAsimple jla_likelihood_v4
Planck2015_distances Planck2015_LCDM
BAO BAO-6dF+SDSS+BOSS+Lyalpha+WiggleZ.txt
CosmicChrono thirtypointsHz.txt
## end of data
## TEX REPRESENTATION
h h
Och2 \Omega_{c0}h^2
Obh2 \Omega_{b0}h^2
Orh2 \Omega_{r0}h^2
Oc0 \Omega_{c0}
Ob0 \Omega_{b0}
Or0 \Omega_{r0}
Od0 \Omega_{d0}
Om0 \Omega_{m0}
M \Delta{M}
# end of tex