# Temperature Anisotropies in the CMB Map Part II

This is the second part of problems about Temperature Anisotropies in the CMB Map. If you haven't completed the first part, please do so here.

In this part, we will try to understand the two-point angular correlation function as it pretains to the CMB map and calculate it from CMB maps from the WMAP and PLANCK experiments.

The anisotropies in the CMB arise because of fluctuations in photon density at recombination. These anisotropies can be described by a field $\Delta T(\hat{n})$ on a 2-sphere, where $\hat{n}$ is a radial unit vector. Notice that earlier, we were describing fluctuations by $\delta{T} / T$. One way to fix the inconsistency is to define $\Delta T = \delta T / T$ but don't worry about that too much. We can then characterize the statistical properties of this field by the N point correlation function, $$C(\hat{n}_1, \hat{n}_2, \hat{n}_3, \ldots, \hat{n}_N) = \left< \Delta T(\hat{n}_1) \Delta T(\hat{n}_2) \ldots \Delta T(\hat{n}_N) \right> \,.$$

However, because of the assumption we made earlier that the temperature variations are Gaussian, these correlation functions vanish for odd $N$. Try to think why this should be the case. If you're not sure, you can always reach out at our forums.

So we need to consider only even-N correlation functions. But, correlation functions for even-$N$ can be written as a simple product of two-point correlation functions (this comes from Wick's theorem). Therefore, we only need to consider the two-point correlation function, $$C(\hat{n}_1, \hat{n}_2) = \left< \Delta T(\hat{n}_1) T(\hat{n}_2) \right> \,.$$

This completely characterizes statistics of the temperature variation. (Aside: one way to look for non-inflationary signatures in the universe is to look for non-Gaussian variations of $T(\hat{n})$. This can be done by probing the three-point function $\left< T(\hat{n}_1) T(\hat{n}_2) T(\hat{n}_3)\right>$ for non-zero values. This is often called the bispectrum.) Like described earlier part I, this can be decomposed into a sum of spherical harmonics and the coefficients can be written as the integral, $$a_{lm} = \int \, \Delta T(\hat{n}) Y_{lm}(\hat{n}) \, \mathrm{d} \Omega \,.$$

This gives the covariance matrix, $$\left< a_{lm} a^{*}_{l'm'} \right> = \int \, C(\hat{n}_1, \hat{n}_2) Y_{lm}(\hat{n}_1) Y^{*}_{l'm'}(\hat{n}_2) \, \mathrm{d}\Omega_{\hat{n}_1} \mathrm{d}\Omega_{\hat{n}_2} \,,$$ which contains all the information about our field $\Delta T(\hat{n})$. We now make an assumption that the temperature fluctuations are statistically homogeneous. This means the mean and variance of our distributions are invariant under coordinate transformations. This can be written as, $$\left< \Delta T(\hat{n} + \delta \hat{n} ) \right> = \left< \Delta T(\hat{n}) \right>$$ $$C(\hat{n}_1 + \delta \hat{n}, \hat{n}_2 + \delta \hat{n}) = C(\hat{n}_1, \hat{n}_2) \,.$$

If we then take the average ensemble temperature to be zero, this suggests that we can also assume the field is statistically isotropic i.e. instead of being explicit functions of $\hat{n}_1, \hat{n}_2$, it is a function of the separation $\hat{n}_1 \cdot \hat{n}_2 = \cos{\theta}$. So our variance depends only on the angular separation $\theta = \cos^{-1}{ (\hat{n}_1 \cdot \hat{n}_2) }$. Hence, we can decompose $C(\hat{n}_1, \hat{n}_2)$ into a sum of Legendre polynomials, instead of spherical harmonics like earlier, $$C(\hat{n}_1, \hat{n}_2) = C(\theta) = \frac{1}{4 \pi} \sum_{l=2}^{\infty} \, (2l + 1) \, C_l \, P_l(\cos{\theta}) \, ,$$ where the coefficients $C_l$ are the same as the $C_l$'s used in Part I.

It can then easily be shown that, $$\left< a_{lm} a^{*}_{l'm'} \right> = C_{l} \, \delta_{ll'} \, \delta_{mm'} \,,$$ thereby showing that specifying $C_l$'s is equivalent to providing the covariance matrix and so, they encode all the information about our field. Try to prove this to yourself. If you're stuck or need help, please feel free to seek here at our forums.

Now that you understand what the 2-point correlation function is and why it is important, let's calculate it. Various estimators exist for $C(\theta)$ but the most obvious one is, $$C(\theta) = \frac{1}{N_{\mathrm{pairs}}} \sum_{i=1}^{N_\mathrm{pairs}} T_i \, T_j \,,$$ where we sum over pairs of $T_i$ and $T_j$ whose points in space are separated by angle $\theta$.

But, first, let's calculate the theoretical correlation function $C_{\mathrm{th}}(\theta)$. This as we just saw is just, $$C_{\mathrm{th}}(\theta) = \frac{1}{4 \pi} \sum_{l=2}^{\infty} \, (2l + 1) \, C_l \, P_l(\cos{\theta}) \,.$$

You obtained values of $C_l$ in part I. However, those were values as measured by WMAP and PLANCK while here, we want theoretical values. So we need to generate these theoretical $C_l$'s ourselves. We will use CAMB (Code for Anisotropies in the Microwave Background) for this. Go ahead and download and install CAMB.

CAMB is a powerful software and we can do a lot with it. Usually you start with initializing a CAMB object and setting its cosmological parameters like the following:


import camb
from camb import model, initialpower

pars = camb.model.CAMBparams()
pars.set_cosmology(H0=67.5, ombh2=0.022, omch2=0.122, mnu=0.06, omk=0, tau=0.06)



However, here we want to calculate our theoretical $C_l$'s in the $\Lambda$CDM cosmology so we use the default parameters:


pars = camb.model.CAMBparams()
results = camb.get_results(pars)



This now gives you access to a camb.CAMBdata object which lets you calculate a large number of things. Check out the documentation here.

All we are interested in is the get_cmb_power_spectra() method. There, we want to set spectra = 'total' and lmax = 1200. This will thne give you your theoretical $D_l$ as we had defined it in part I. If you set raw_cl=True, then you get $C_l$ directly instead of $D_l$.

Take the values of $D_l$ (or $C_l$) you obtain from here and use them to calculate your theoretical correlation function for $\theta \in [0^o, 180^o]$.

If you paid careful attention in the documentation above, you might have noticed that there is a get_cmb_correlation_functions() method. You can use it directly to find your $C(\theta)$. However, I recommend that you do it using both methods.

You should also explore all the other methods (and objects) there and play around with them. CAMB Is incredibly powerful and lets you do a wide range of cosmological calculations.

Your plot should look like the following. Ignore the WMAP and PLANCK results for now- we'll come back to them later.

Now let's make sure you got accurate results from your calculations. Your units for $C(\theta)$ should be $(\mu K)^2$. In those units, answer the following, correct to the nearest integer:

1. What is $C(\theta=30^o)$?
1. What is $C(\theta=90^o)$?
1. What is $C(\theta=150^o)$?
1. What is $C(\theta=180^o)$?