Authors: Santiago Casas
Year: 2020
Email: santiago.casas@cea.fr
This tutorial is comprised of a series of Jupyter notebooks with simple demonstrations and exercises on how to use CAMB
and CLASS
using python wrappers.
The code is designed for non-experts in the field, therefore it includes relatively
simple explanations of cosmological concepts.
It intends to show a general overview of the things that are possible with Einstein-Boltzmann codes and python.
In order to run the tutorial notebooks and to have the Boltzmann codes installed, without problems, we will use Docker containers. If you haven't installed Docker, check their website for installation instructions. If you are interested in more details about Docker, check our CosmoStat tutorial on Docker for Data Scientists.
-
Pull the docker image that can be found here
docker pull santiagocasas/einstein-boltzmann-codes
-
Clone this repository and checkout into the
boltzmann
branch.git clone -b boltzmann https://github.com/CosmoStat/Tutorials.git
-
Change directory to
Tutorials/Einstein-Boltzmann-Codes
. -
Enter the container by doing:
docker run -p 8888:8888 -v ${PWD}:/home/jovyan/work/:rw -it santiagocasas/einstein-boltzmann-codes
-
Check that you see the
class
andwork
folders by typingls
inside the docker terminal. -
Start a jupyter notebook instance by typing
jupyter notebook
on the terminal. If a browser window does not open, copy and paste the link that appears on the terminal prompt into your favorite browser. If the copied link does not work, try typing0.0.0.0:8888
into your browser. -
To test if the installation worked, run all the cells in the
test_CAMB_CLASS.ipynb
notebook, which you will find in the repo under thework/
directory.
- Recommended:
gcc
andgfortran
compilers. Binaries for all platforms. - CAMB Python installation
- CLASS manual installation
- Python (require >=3.6)
- Cython (require >=3.6)
- Jupyter (recommend >=1.0.0)
- Matplotlib (recommend >=3.0.3)
- NumPy (recommend >=1.16.2)
- Pandas (recommend >= 0.24.0)
- SciPy (recommend >=1.2.1)
- Background Cosmology
- Perturbations and the CMB
- Galaxy Clustering and the Fisher Matrix
- Test Notebook for CAMB and CLASS
In this notebook, we will cover the following concepts:
- What is (precision) Cosmology?
- General Relativity in 5 minutes using
EinsteinPy
- The Hubble equation (self-made)
- The Hubble equation with
CAMB
andCLASS
- Cosmological Distances
In this notebook, we will cover the following concepts:
- Quick introduction to the Cosmic Microwave Background.
- Computing the angular power spectra from
CAMB
andCLASS
. - Interactive comparison of cosmological parameters with Planck data.
- Transfer functions, growth and growth rate.
In this notebook, we will cover the following concepts:
- Quick introduction to Galaxy Clustering with spectroscopic redshifts.
- Building and plotting the GC model with
CAMB
andCLASS
. - Quick introduction to Fisher Matrix forecasts.
- An example of a 2-dimensional GC Fisher Matrix.