In this section we will learn about the CMB data from WMAP (http://map.gsfc.nasa.gov/) and Planck (http://www.esa.int/Our_Activities/Space_Science/Planck). The goals of the exercise are:
Download the WMAP and Planck data from this website:
http://irsa.ipac.caltech.edu/data/Planck/release_2/ancillary-data/
This data comes from: http://pla.esac.esa.int/pla/#cosmology
The description of the data and cosmological parameters is here:
https://wiki.cosmos.esa.int/planckpla2015/index.php/Cosmological_Parameters
and here:
http://wiki.cosmos.esa.int/planckpla2015/images/b/b9/Parameter_tag_definitions_2015.pdf
If you don't have python, we recommend using the Anaconda package, which should have all the modules needed:
https://www.anaconda.com/download/
Once you have it installed, you can start an Jupyter noebook with a terminal command
$ jupyter notebook
or follow instructions here: https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
To plot the distribution, use the corner plot:
https://github.com/dfm/corner.py/blob/master/corner/corner.py
more details: https://corner.readthedocs.io/en/latest/
Different cosmological models are in different folders. Here are examples:
base - base flat Lambda-CDM model (use plikHM_TTTEEE_lowTEB)
base_w - base flat Lambda-CDM model with varying Dark Energy equation of state w (use plikHM_TTTEEE_lowTEB)
base_w_wa - base flat Lambda-CDM model with varying Dark Energy equation of state w, which can evolve with scale factor (use plikHM_TTTEEE_lowTEB_BAO)
base_omegak - Lambda-CDM model with varying curvature (use plikHM_TTTEEE_lowTEB)
Combination of different datasets used are in subfolders, for example:
plikHM_TTTEEE_lowTEB - using Planck Temperature - Temperature (TT) and Temperature - E-mode-polarisation (TE) and E-mode-polarisation - E-mode-polarisation (EE) power spectra, low l-range of Cls
plikHM_TTTEEE_lowTEB_BAO - as above, but use also use BAO data (Baryon Accoustic Oscillations will be covered later in the course)
WMAP - use WMAP data
import numpy as np
import pylab as pl
import pandas as pd
%pylab inline
from corner import corner
# MCMC chain samples
samples = np.loadtxt('COM_CosmoParams_fullGrid_R2.00/base/WMAP/base_WMAP_1.txt')
# load the column names for the samples
column_names_raw = np.loadtxt('data/COM_CosmoParams_fullGrid_R2.00/base/WMAP/base_WMAP.paramnames', dtype=np.str, usecols=[0])
column_names = [x.replace("b'",'').replace("'",'') for x in column_names_raw]
# make a data frame with column names and samples
samples1 = pd.DataFrame(samples[:,2:], columns=column_names) # first two columns are not important
# define which parameters to use
use_params = ['omegam*', 'omegabh2']
pl.figure()
sigma1 = 1. - exp(-(1./1.)**2/2.)
sigma2 = 1. - exp(-(2./1.)**2/2.)
_=corner(samples1[use_params], range=[(0.1, 0.5), (0.02, 0.025)], bins=20, levels=(sigma1, sigma2), color='r')
help(corner)
column_names