Generating the CMB From a Power Spectrum

The reason we have been looking at the decomposition of a function into spherical harmonics (here and here) is that we have theoretical predictions for the power spectrum of the CMB. We will look later at where those predictions come from. Here we will look at the structure we would expect in the CMB, given some power spectrum.1

The temperature of the CMB can be described as a sum over the spherical harmonics,

T(θ,ϕ)=l=0m=llalmYlm(θ,ϕ) T(\theta, \phi) = \sum_{l=0}^{\infty} \sum_{m=-l}^{l} a_{lm} Y_l^m(\theta, \phi) (1)

But, the alma_{lm} are not independent. At a given ll , the coefficients are drawn from a normal distribution with variance ClC_l ,2

almN(0,Cl1/2) a_{lm} \sim \mathcal{N}(0, C_l^{1/2})

However when comparing the contributions from different ll , a more useful rescaling is,

Dll(l+1)2πCl D_l \equiv \frac{l(l + 1)}{2 \pi} C_l

which better shows the relative importance of the multipoles.

With that in mind, see how the temperature map depends on the power spectrum by drawing a power spectrum and looking at the resulting map. Note that a single power spectrum can result in many different maps. Changing the power spectrum updates the map without regenerating the alma_{lm} . Clicking the button below generates a new realization using new coefficients.

The Scale of the Temperature Variations

The units of the DlD_l and therefore the ClC_l are μK2\rm{\mu K^2} – micro Kelvin squared.3 The, alma_{lm} are drawn from a normal distribution with a standard deviation of the square root of this and so the temperature maps have units of μK\rm{\mu K} . You can verify that things are roughly correct by drawing a power spectrum that is similar to that of Planck and seeing the maxima and minima are roughly ±300μK\pm 300 {\rm \mu K} (the exact values will depend on exactly how the harmonics line up). You can compare this to the map in Figure 6 of PlanckCollaboration et al. (2020) to see that the scale is roughly right.

Where are the Monopole and Dipole?

You will notice that the power spectrum starts at l=2l = 2 (also called the quadrupole as the map contains 4 maxima/minima) and we don’t show the monopole (l=0l = 0 ) or dipole (l=1l = 1 ). The monopole is the average temperature of the CMB (T=2.725T = 2.725 ) and is just subtracted out – in the maps we show the deviation from this average. The observed dipole is a combination of the intrinsic CMB dipole and the motion of the instrument. The intrinsic dipole we expect to have a similar power as other low frequency harmonics (Cl1/210μKC_l^{1/2} \sim {\rm 10 \mu K} ) but we observe a dipole of amplitude 3362μK3362 {\rm \mu K} . This suggests that the Planck instrument is moving at a velocity of 370km/s370 {\rm km/s} relative to the CMB. The components that make up this speed include the rotation of the sun around the center of the galaxy (240km/s240 {\rm km/s} ), and the center of the galaxy’s movement primarily towards the Great Attractor (565km/s565 {\rm km/s} ).4 All these figures can be found in Table 3 of PlanckCollaboration et al. (2020).

How this Actually Works

If you’ve made it to the end, I should probably come clean about exactly how this works.

While I would have liked nothing more than to generate the temperature maps using equation (1), it is simply not possibly computationally.5 The number of operations required to generate a map with nn pixels for the ll ’th harmonic is O(nl)O(nl) as we need to sum over all 2l+12l + 1 values of mm for each pixel. Generating a map with all harmonics up to ll therefore takes O(nl2)O(nl^2) operations. Thus, computing the smallest map which has 700\sim 700 pixels and goes to l=1000l = 1000 would require almost a billion operations (each of which require a couple of additions, multiplications and computing a sin\sin ). This is possible, but takes O(10 minutes)O(10\ {\rm minutes}) on a midrange laptop and so getting an intuitive feel for how changes in the power spectra affect the temperature map is impossible.

There are a couple of possible workarounds, the best of which is precomputing the maps for each spherical harmonic (each ll ) by summing over all the orders (all 2l+12l + 1 of the mm ). To do this I needed to generate a realization of all the alma_{lm} which I did assuming that Cl=1C_l = 1 . When you draw a new power spectrum, we then rescale each of these maps for the individual ll by the appropriate ClC_l , and sum all the maps together. This reduces the problem back to O(nl)O(nl) – sum all ll maps for each of the nn pixels.

The major drawback of this workaround is that only a single realization of the CMB map can be generated for a given power spectrum. There are an infinite number of possible combinations of alma_{lm} that can be drawn from the normal distribution, but in doing the precompute I locked in a single set. To get around this, I actually generated two sets of alma_{lm} and two maps for each harmonic. When you click “New Realization”, we randomly choose which of those two sets to use for each ll . This gives 2l(nonzero)2^{l({\rm nonzero})} possible realizations which is small if only a few ClC_l are nonzero, but quickly becomes large. For example if only 20 of the ClC_l are nonzero there are \sim a million realizations which will hopefully be enough for you!

The final drawback with doing the precompute is that I need to send a largish (10MB\sim 10 {\rm MB} ) chunk of data to you containing the precomputed maps. If you live in a place with good internet, you probably didn’t notice this. If you do not, I’m sorry if it took a while to load!

References

PlanckCollaboration, Nabila Aghanim, Yashar Akrami, Frederico Arroja, Mark Ashdown, J Aumont, Carlo Baccigalupi, et al. 2020. “Planck 2018 Results-I. Overview and the Cosmological Legacy of Planck.” Astronomy & Astrophysics 641: A1.

Tristram, M, and K Ganga. 2007. “Data Analysis Methods for the Cosmic Microwave Background.” Reports on Progress in Physics 70 (6): 899–946. https://doi.org/10.1088/0034-4885/70/6/r02.


  1. A lot of what I talk about here comes from Tristram and Ganga (2007) which is nice and pedagogical.↩︎

  2. Note that, as we are modeling the temperature, these are sometimes written almTa_{lm}^{T} and ClTC_l^T . This is to differentiate the Temperature power spectrum from the power spectra of other CMB properties (such as E and B mode polarization). I will not use the superscript here, but I mention it so that if you see it elsewhere you won’t (like me) spend far too long trying to work out why we are taking the transpose of a scalar…↩︎

  3. To be completely clear, μK2{\rm \mu K^2} could be written (μK)2{\rm (\mu K)^2} . For some reason when I see (for example) km2{\rm km^2} it is obvious that it is a kilometer squared rather than a thousand square meters. Maybe this is because I can visualize a block of land a kilometer on each side. It wasn’t immediately obvious that the same was true with μK2{\rm \mu K^2} , maybe because I can’t visualize a squared micro Kelvin.↩︎

  4. If you are wondering how these sum to 370, remember that these are vectors. So the motion of the center of the galaxy and the motion of the sun around the center of the galaxy are mostly in opposite direction.↩︎

  5. Or at least, I don’t know enough clever mathematical or Javascript tricks to make it possible!↩︎