MontePython Exercises IFT School on Cosmology Tools

Similar documents
Monte Python. the way back from cosmology to Fundamental Physics. Miguel Zumalacárregui. Nordic Institute for Theoretical Physics and UC Berkeley

Getting Started with MontePython Solution to Exercises

Introduction to hi class

Introduction to CosmoMC

CosmoSIS Webinar Part 1

Solution to running JLA

Vasiliki A. Mitsou. IFIC Valencia TAUP International Conference on Topics in Astroparticle and Underground Physics

To Lambda or not to Lambda?

Lecture 03. The Cosmic Microwave Background

Galaxies 626. Lecture 3: From the CMBR to the first star

BAO & RSD. Nikhil Padmanabhan Essential Cosmology for the Next Generation VII December 2017

The Power. of the Galaxy Power Spectrum. Eric Linder 13 February 2012 WFIRST Meeting, Pasadena

Lecture II: Background

Challenges of Vacuum Structure in Cosmology

The Cosmic Linear Anisotropy Solving System:

Neutrino Mass Limits from Cosmology

Cosmological Constraints on Dark Energy via Bulk Viscosity from Decaying Dark Matter

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2

Cosmological Constraints on Newton s Gravitational Constant for Matter and Dark Matter

Cosmology II: The thermal history of the Universe

Galaxy Formation Seminar 2: Cosmological Structure Formation as Initial Conditions for Galaxy Formation. Prof. Eric Gawiser

What do we really know about Dark Energy?

Constraining Dark Energy with BOSS. Nicolas Busca - APC Rencontres de Moriond 19/10/2010

Satellite project, AST 1100

Cosmology and particle physics

Three ways to measure cosmic distances. Chris Blake, Swinburne

with Matter and Radiation By: Michael Solway

n=0 l (cos θ) (3) C l a lm 2 (4)

Whitepaper: For a Comprehensive Space-Based Dark Energy Mission

Nonparametric Inference and the Dark Energy Equation of State

BARYON ACOUSTIC OSCILLATIONS. Cosmological Parameters and You

CosmoSIS a statistical framework for precision cosmology. Elise Jennings

TESTING GRAVITY WITH COSMOLOGY

Physics 463, Spring 07. Formation and Evolution of Structure: Growth of Inhomogenieties & the Linear Power Spectrum

Baryon Acoustic Oscillations (BAO) in the Sloan Digital Sky Survey Data Release 7 Galaxy Sample

Lecture 09. The Cosmic Microwave Background. Part II Features of the Angular Power Spectrum

Cosmology and Large Scale Structure

Dark Energy in Light of the CMB. (or why H 0 is the Dark Energy) Wayne Hu. February 2006, NRAO, VA

PAPER 71 COSMOLOGY. Attempt THREE questions There are seven questions in total The questions carry equal weight

The early and late time acceleration of the Universe

Planck constraints on neutrinos. Massimiliano Lattanzi Università di Ferrara on behalf of the Planck Collaboration

AST4320: LECTURE 10 M. DIJKSTRA

Isotropy and Homogeneity

eboss Lyman-α Forest Cosmology

Introduction to COSMOMC

Physical Cosmology 18/5/2017

Lecture #25: Plan. Cosmology. The early Universe (cont d) The fate of our Universe The Great Unanswered Questions

Searches for a Stochastic Gravitational-Wave Background

Introduction to Computer Tools and Uncertainties

Ta-Pei Cheng PCNY 9/16/2011

Cosmology. Jörn Wilms Department of Physics University of Warwick.

Basic BAO methodology Pressure waves that propagate in the pre-recombination universe imprint a characteristic scale on

Structure in the CMB

A5682: Introduction to Cosmology Course Notes. 11. CMB Anisotropy

Physical Cosmology 12/5/2017

Modern Physics notes Spring 2005 Paul Fendley Lecture 38

The State of Tension Between the CMB and LSS

An accurate determination of the Hubble constant from baryon acoustic oscillation datasets

Theoretical developments for BAO Surveys. Takahiko Matsubara Nagoya Univ.

Introduction. How did the universe evolve to what it is today?

Vacuum energy, cosmological constant problem and the worst theoretical prediction ever

Observational evidence for Dark energy

Complementarity in Dark Energy measurements. Complementarity of optical data in constraining dark energy. Licia Verde. University of Pennsylvania

D. f(r) gravity. φ = 1 + f R (R). (48)

Newton s Cooling Model in Matlab and the Cooling Project!

Cosmology Distinction Course

The Degeneracy of Dark Energy and Curvature

A FIGURE OF MERIT ANALYSIS OF CURRENT CONSTRAINTS ON TESTING GENERAL RELATIVITY USING THE LATEST COSMOLOGICAL DATA SETS.

Cosmology with high (z>1) redshift galaxy surveys

El Universo en Expansion. Juan García-Bellido Inst. Física Teórica UAM Benasque, 12 Julio 2004

Monte Carlo Markov Chains: A Brief Introduction and Implementation. Jennifer Helsby Astro 321

Ringing in the New Cosmology

PAPER 73 PHYSICAL COSMOLOGY

You may not start to read the questions printed on the subsequent pages until instructed to do so by the Invigilator.

Assignment 2 Atomic-Level Molecular Modeling

Cosmological Signatures of a Mirror Twin Higgs

Planck results (1 st release)

The Early Universe John Peacock ESA Cosmic Vision Paris, Sept 2004

Elise Jennings University of Chicago

Experiment 1: The Same or Not The Same?

Modern Cosmology Solutions 4: LCDM Universe

Theoretical Explanations for Cosmic Acceleration

Astro-2: History of the Universe

A brief Introduction to CAMB and CosmoMC

Baryon Acoustic Oscillations and Beyond: Galaxy Clustering as Dark Energy Probe

A5682: Introduction to Cosmology Course Notes. 11. CMB Anisotropy

Multi-GPU Simulations of the Infinite Universe

FYST17 Lecture 13 The cosmic connection. Thanks to R. Durrer, L. Covi, S. Sakar

Redshift-Distance Relationships

BAO from the DR14 QSO sample

Determining neutrino masses from cosmology

Dark Matter and Cosmic Structure Formation

Chapter 23 Lecture. The Cosmic Perspective Seventh Edition. Dark Matter, Dark Energy, and the Fate of the Universe Pearson Education, Inc.

Baryon Acoustic Oscillations Part I

CS Deep Reinforcement Learning HW2: Policy Gradients due September 19th 2018, 11:59 pm

Power spectrum exercise

Concordance Cosmology and Particle Physics. Richard Easther (Yale University)

THE PAU (BAO) SURVEY. 1 Introduction

Cosmology. Introduction Geometry and expansion history (Cosmic Background Radiation) Growth Secondary anisotropies Large Scale Structure

Set 3: Cosmic Dynamics

Transcription:

MontePython Exercises IFT School on Cosmology Tools Miguel Zumalacarregui March 16, 2017 The exercises have been ranked by level of difficulty (boring = v, interesting = challenging = and whether they require hi class (h c). Exercises marked require short MCMC execution time and have parts suitable for execution on a laptop (do when varying 1-2 parameters, otherwise use Hydra). MP in Hydra: To run MP in Hydra you will need to do the following: 1. Load the necesary modules in your script module load numpy module load scipy v v, v vv) 2. For some reason (?) MontePython has an error when runninng as is, but it works in the LUSTRE filesystem. You have a folder asigned in that filesystem under /lustre/school/studxx/ Make sure that the output directory (-o) is situated there, i.e. launch with python montepython/montepython.py run -p your_model.param \ -o /lustre/school/studxx/your_model 3. For (optional) paralelization, add prun to your call (i.e. prun python montepython/...). You could in principle use module load mpi4py but that s not necessary (and makes Hydra complain). Exercise 1: The Ω m Ω Λ plane ( v vv, ) This exercise relies on constraints from the cosmic expansion: is fast enough to be done on a laptop ( 0.1s/model on mine). You can let it run during the coffee break and make some cool plots when you come back!. We will obtain Baryon Acoustic Oscillation (BAO) constraints on the Ω m Ω Λ plane for a two parameter model. We will vary Ω cdm and Ω k, keeping Ω b and H 0 fixed by setting the 1σ values to zero (recall Ω Λ is a derived parameter). Use the following example: data.experiments=[ bao_boss, bao_boss_aniso ] data.parameters[ Omega_cdm ] = [0.3, 0, None, 0.05, 1, cosmo ] data.parameters[ Omega_k ] = [0.0, -0.5,0.5, 0.05, 1, cosmo ] data.parameters[ Omega_b ] = [0.045, 0, None, 0.0, 1, cosmo ] data.parameters[ h ] = [0.68, 0, None, 0, 1, cosmo ] data.parameters[ Omega_Lambda ] = [1,None,None,0, 1, derived ] data.cosmo_arguments[ YHe ] = 0.24 data.n=10 data.write_step=5 1

It is important to give meaningful names to the files and folders to keep track of your work. I suggest labeling this combination of parameters and experiments as lc_bao.param (this notation means l for Λ, c = CDM and bao = BAO from BOSS galaxies). Note: the limits on Ω k are so that CLASS does not coplain. Fixing the Helium fraction Y He is good to run other cases, like SNe constraints varyinb Ω b as well. The basic part of the exercise ( v) involves the following steps: a) Write the above into a.param file and do a short Monte Python run: time python montepython/montepython.py -p lc_bao.param -o chains/lc_bao -N 10 The time prefix is just to know how long it will take (you can use that information to adjust the parameters to how much time you have). b) Now you can do the serious run mpirun -np 4 python montepython/montepython.py -o chains/lc_bao -N 10000 where you can adjust N to a larger number (-N 10000 should be feasible, if you take a longer break you can increase accordingly). Because you are running from a folder with a log.param you don t need to provide the.param file again. Add either --update 300 (to improve the covariance matrix on the fly) or provide a covariance matrix with -c name.covmat (MP will interpret the parameters for you). The call mpirun -np 4 (use prun in Hydra, number of processes automatically determined) at the begining of the command runs 4 chains in the same console (adjust -np to your number of cores). If you don t have openmpi you can remove mpirun and just run on -np different consoles. c) Relax while your computer does the work. If you come back early and there are enough points (go to output directory and type wc -l *.txt to count) you can cancell the work (press Ctrl+c). d) Analyze the chains. You can use MP in info mode: python montepython/montepython.py info chains/lc_bao plus the optional options. Take at the nice plots in chains/lc_bao/plots and all the other files generated in the analysis. e) You are encouraged to play with the different options. Try to plot the marginalized contours using Ω m = Ω cdm + Ω b instead of Ω cdm. f) Once you have several datasets (some ideas are suggested below) you can plot them together. Just feed MP info mode with several folders. How do the different constraints compare? Make sure that each model/data combination goes to a different -o directory! Otherwise you ll keep running the same thing over and over again. The rest of the exercise is optional and slightly harder ( vv). Bear in mind that the amount of free parameters increases and the runs will require more time. Realistic BAO: By not varying Ω b, H 0 we are fixing the comoving BAO scale r s (i.e. the coordintate size of the standard ruler). Although r s is well constrained by the CMB, there is some variability, which you may take into account by letting Ω b vary within some range. Do a run varying the baryon fraction. You can do this in two ways a) More elegant: add a gaussian prior on ω b Ω b h 2. This is the goal of exercise 2. b) Easier: dd a hard prior to allow for 2σ devaitions (change Omega_b omega_b in the.param file, as well as the central value and limits). 2

Supernovae: There are other background observations besides BAO, like type 1A Supernovae (SNe). Run the same model with the Union SNe compilation with data.experiments=[ sne ]. For a more challenging option you can use the JLA SNe sample data.experiments=[ JLA ]. You need to download the data, the numexpr package and add several nuisance parameters. Read the instructions in the likelihood folder and jla.param. Exercise 2: Adding a new likelihood ( v, ) Adding a new likelihood in Montepython is only as complex as the likelihood itself. You will get to see with this simple example. Our goal is to add a gaussian prior on the physical baryon density using the Planck result ω b = Ω b h 2 = 0.02222 ± 0.00023, (1) (https://arxiv.org/abs/1502.01589, Table 1, col 6). The steps are: a) Copy a simple likelihood folder from montepython/likelihoods (for instance hst) and rename it as cmb_baryon. Change the name of the.data file to be cmb_baryon.data. b) In cmb_baryon.data change hst cmb_baryon and h omega_b. Update the central value and standard deviation according to eq. (1). c) Update init.py by changing the name of the class, the data (as given.data file, it is read as self.xxx ) and the theoretical value (cosmos.omega_b() as given by classy) You can launch a short run with data.experiments=[ cmb_baryon ] data.parameters[ omega_b ] = [2, 0, None, 0.02, 1e-2, cosmo ] data.n=10 data.write_step=5 and check that the chains are roughly gaussianly distributed around the mean (note that the parameter is rescaled by 1e-2). Exercise 3: Modified gravity constraints ( vv, h c) You implemented a model in hi_class, now you can test whether it makes sense or not! Run an MCMC for the model you implemented in CLASS/hi_class sheet exercise 4. Run varying one of the α s parameters and the exponent n (see the end of exercise 4 for the syntax of gravity_parameters_smg in the.param file). For simplicity you can use synthetic likelihoods like fake_planck_bluebook,euclid_pk, euclid_lensing and/or fake_desi. What happens to the constraints when n becomes very small? What happens when it s large? Exercise 4: Running of the Planck Mass ( vvv, h c, ) This exercise is meant to use hi_class interfaced with Monte Python while using only background constraints, similarly to the previous exercise. Because the models currently implemented do not affect the background expansion, you will need to make some minor changes. The first part of the exercise is to introduce a model with non-trivial background dynamics in hi_class. The Friedmann equations in hi_class (see background_gravity_functions) it read H 2 = ρ, H = 3 a (ρ + p), (hi class), (2) 2 where ρ is the total energy density, including the contribution from modified gravity. Recall that H = ȧ/a (derivative wrt cosmic time, while F = F /a denotes derivative wrt conformal time) and in CLASS the prefactor 8πG/3 is absorbed in the units of ρ. 3

A more interesting model amounts to letting the effective Planck mass determine the cosmological strength of gravity by entering the Friedmann equation explicitly: H 2 = ρ, H = 3 2 aρ + p, (modified) (3) so that M 2 > 1 weakens the gravitational strength (i.e. G eff = M 2 ). This model is described in Z. Huang s https://arxiv.org/abs/1511.02808, along with observational constraints, some of which we can reproduce. The models (2, 3) are related by a redefinition of the dark energy density entering in ρ. By comparing both sets of equations we see that they are related by the following redefinition ρ smg ρ smg + 1 ρ, (4) where ρ is the total energy density (including ρ smg ), and similarly for the pressure. The existence of such a simple redefinition is why we have decided to keep the standard Friedmann equations for parameterizations (not to mention things like compatibility with the perturbation equations, or the cosmic sum rule). If you believe (and it is a reasonable belief) that (3) is the right description for modified gravity, or you just want to explore its consequences, you can just define a new expansion_model_smg. a) Start by including eq. (4) in an expansion model. To keep things general we can use the (w 0 w a ) parameterization as the base (wowa in the code). In background_gravity_functions (of background.c) search for wowa and add pvecback[pba->index_bg_rho_smg] += (1.-M_pl)/M_pl*(pvecback[pba->index_bg_rho_smg] + pvecback[pba->index_bg_rho_tot_wo_smg]); pvecback[pba->index_bg_p_smg] += (1.-M_pl)/M_pl*(pvecback[pba->index_bg_p_smg] + pvecback[pba->index_bg_p_tot_wo_smg]); Add a message to background_gravity_parameters in case wowa, so you know that you are modifying the Friedmann equation. Better implementation: Instead of just modifying an existing parameterization, add an additional expansion_model_smg following the guidelines given in the hi_class exercise 4 (name suggestion wowa_mrun). This will take a bit longer, but allows (2) and (3) to coexist. b) Compile and make sure that the code works. Run it with the following.ini file Omega_fld = 0 Omega_Lambda = 0 Omega_smg = -1 expansion_model = wowa #or your new expansion model name expansion_smg = 0.7, -1, 0 gravity_model = propto_omega parameters_smg = 1., 0., 1.0., 0., 1. root = output/mpl_run_test_1.0_ write background = yes please Plot the angular diameter distance. You should find a 2.5% decrease for c M = 1 relative to c M = 0. Although (3) naïvely suggests that a higher M 2 reduces the Hubble rate (which would increase the distances), the parameters are adjusted so the value of H 0 is equal in all cases and hence H(z) increases with α M at intermediate redshifts. Note that we re interested mainly in the background. However, with the modifications you have just made all linear perturbations (C l, P (k), etc...) are automatically consistent with the model. c) Now test the model against the data! Vary the value of c M for BAO and/or SNe. I suggest that you start by varying only α M, with all the other parameters fixed. For the.param file try: data.cosmo_arguments[ expansion_model ] = wowa 4

data.parameters[ expansion_smg 1 ] = [0.7, 0,None, 0.0, 1, cosmo ] data.parameters[ expansion_smg 2 ] = [ -1, 0,None, 0.0, 1, cosmo ] data.parameters[ expansion_smg 3 ] = [0.0, 0,None, 0.0, 1, cosmo ] data.cosmo_arguments[ gravity_model ] = propto_omega data.parameters[ parameters_smg 1 ] = [1., 0, None, 0, 1, cosmo ] data.parameters[ parameters_smg 2 ] = [0., None,None, 0, 1, cosmo ] data.parameters[ parameters_smg 3 ] = [0., -2,2, 1e-1, 1, cosmo ] data.parameters[ parameters_smg 4 ] = [0., 0, None, 0, 1, cosmo ] data.parameters[ parameters_smg 5 ] = [1., None,None, 0, 1, cosmo ] d) Plot the results and compare with https://arxiv.org/abs/1511.02808. e) To make things more interesting repeat the run with different datasets and parameters. 5