Demo 2: Getting Planck and BICEP likelihoods for a single cosmology
Before you run this demo, you will need to download the Planck data here unless you have just installed it during the bootstrap phase adding the -d option in
After you have downloaded the file, edit demos/demo2.ini and change the line: t_high_file = to specify the path to the file you just downloaded.
Once you have saved demo2.ini you can run:
You should seem some output from CAMB, just like in demo1. At the end you will also see the total likelihood value of the cosmology.
This time the output directory is called output/demo2. You can look at the individual likelihood values by looking at the file:
As before, you can also plot it using:
postprocess demos/demo2.ini -o plots -p demo2
or, with R:
./cosmosis/plotting/cosmology_theory_plots.r output/demo2 -o plots -p demo2
You will now have a collection of png plots in the plots directory. This time they will include a BB plot, which we need for BICEP:
Once again, the pipeline is defined in the section of that name
[pipeline] modules = consistency camb planck bicep2 values = demos/values2.ini ; ... likelihoods = bicep planck
This time we are running four modules - consistency, camb, Planck, and Bicep2. You can see the paths to them in the sections below. The latter two of these are interesting in that they generate likelihood values, which can be used by MCMC samplers to explore the parameter space. We have also told cosmosis what likelihoods it should look for by setting: likelihoods = bicep planck
This means that CosmoSIS will look for two values, bicep_like and planck_like in the likelihood section when it comes to work out the total likelihood. There may be other likelihoods calculated (for example, the file output/ddedmo2/likelihoods/values.txt contains all the separate Planck contributions as well as the total), but if they are not in this list they will not be included.
Now have a look at the demos/values2.ini file. You will see that we now have to different sections to split up the parameters we use by type. We have the regular cosmological parameters (now including r_T=0.2 as we are in the exciting post-BICEP world), but we also have the many nuisance parameters that Planck needs to know.