← Lab
Lab · live demo

CMB Power Spectrum

Move the six parameters of a flat ΛCDM universe and watch the temperature (TT), polarisation (EE) and cross (TE) spectra of the CMB respond.

A plot of the CMB TT power spectrum with its acoustic peaks, next to sliders for six cosmological parameters and buttons for TT, EE and TE
What it is

The power spectrum says how strong the fluctuations of the CMB are at each angular scale: Dℓ=ℓ(ℓ+1) Cℓ/2πD_\ell = \ell(\ell+1)\,C_\ell/2\pi against the multipole ℓ\ell, where larger ℓ\ell means smaller angles on the sky. The dashed curve is the Planck 2018 best-fit model and the solid one is yours. TT is the temperature, EE the E-mode polarisation and TE their correlation. The horizontal axis is logarithmic up to ℓ=30\ell = 30 and linear after it.

01 What each slider does

The model is flat ΛCDM with primary anisotropies and CMB lensing (CAMB); there is no SZ, no foregrounds, no tensor modes. The sliders for the matter densities are Ωb\Omega_b and Ωc\Omega_c, as fractions of the critical density. The CMB responds to the physical densities ω=Ωh2\omega = \Omega h^2, and they are kept independent of H0H_0: moving H0H_0 leaves ωb\omega_b and ωc\omega_c alone and the two Ω\Omega sliders move instead, as ω/h2\omega/h^2. Below, for each parameter: what it is, the physics it enters through, and its contribution to the spectrum.

Baryon density Ωb\Omega_b (ωb=Ωbh2\omega_b = \Omega_b h^2)

How much ordinary matter there is: the protons and electrons that make up stars, gas and us, about 5% of the universe's energy.

Physics

Before recombination the photons and baryons are one fluid, a plasma that falls into the dark-matter potential wells and is pushed back out by photon pressure, ringing like a sound wave. Baryons add weight to that fluid: it sags deeper into the wells than it springs back out, so the compressions are favoured over the rarefactions. Heavier fluid also carries sound more slowly, so the wave travels a shorter distance before recombination. And more baryons mean more free electrons, which keep photons more tightly coupled and let less of the small-scale structure leak out by photon diffusion (Silk damping).

What to expect

Compression (odd) peaks are enhanced over rarefaction (even) peaks by an amount that grows with RR, so the 2nd peak drops relative to the 1st and 3rd. A smaller rsr_s moves the peaks to higher ℓ\ell, ℓn≈nπDA/rs\ell_n \approx n\pi D_A/r_s, as a small shift. The damping wavenumber kDk_D grows with ωb\omega_b, so the envelope e−2(ℓ/ℓD)2e^{-2(\ell/\ell_D)^2} moves out and the damping tail rises slightly. The same odd/even modulation is in EE, in the opposite phase to TT. Try: raise Ωb\Omega_b and watch the 2nd peak fall.

Cold dark matter density Ωc\Omega_c (ωc=Ωch2\omega_c = \Omega_c h^2)

How much non-baryonic matter there is, which feels gravity but never interacts with light, about a quarter of the universe.

Physics

Dark matter is the scaffolding the plasma moves on. Its main role in the CMB is the timing of matter-radiation equality: the more dark matter, the earlier gravity takes over from radiation. While radiation still matters, the potential wells that the fluid is falling into are decaying, and this decay pumps the oscillation like pushing a swing at the right moment, boosting the peaks. The sooner equality happens, the less pumping the modes get; the same residual radiation also gives a leftover early ISW signal near the first peak.

What to expect

A larger ωc\omega_c moves zeqz_{\rm eq} earlier: less driving, less early ISW, so the peaks come down, the 1st most. The low-ℓ\ell Sachs-Wolfe plateau, Θ≃Φ/3\Theta \simeq \Phi/3 with Φ=35ζ\Phi = \tfrac35\zeta in matter domination, does not depend on ωc\omega_c at fixed AsA_s, so the peaks sink against it. A faster early expansion also shrinks rsr_s and a larger ωm\omega_m changes DAD_A, so the peaks shift in ℓ\ell a little. At fixed H0H_0 a larger Ωc\Omega_c lowers ΩΛ\Omega_\Lambda. Try: raise Ωc\Omega_c and compare the 1st peak with the plateau.

Hubble constant H0H_0

The expansion rate today, in km/s/Mpc. It sets the size of the universe and the scale for distances.

Physics

The CMB does not know about H0H_0 directly: it knows the physical densities, and the angle on the sky at which we see the fixed physical ruler of the sound horizon. Here H0H_0 is varied with the physical densities ωb\omega_b and ωc\omega_c held fixed (the Ω\Omega sliders move to compensate), so the early-universe physics, and the ruler, do not change at all. What changes is the dark energy: in a flat universe a larger H0H_0 means a smaller matter fraction Ωm=ωm/h2\Omega_m = \omega_m/h^2 and so a larger ΩΛ\Omega_\Lambda, which shortens the distance to the last-scattering surface. The same ruler at a shorter distance looks larger, so the acoustic pattern is redrawn on the sky with each feature spanning a larger angle, and the peaks sit at higher ℓ\ell.

What to expect

The acoustic angle is θ∗=rs/DA\theta_* = r_s/D_A (shown under the sliders), and every peak is at ℓn≈nπ/θ∗\ell_n \approx n\pi/\theta_* with a phase shift (about ℓA≈π/θ∗≈300\ell_A \approx \pi/\theta_* \approx 300 for the Planck model, the 1st peak near 220). With rsr_s fixed by ωb\omega_b and ωc\omega_c, a larger H0H_0 only shortens DAD_A (through ΩΛ\Omega_\Lambda), and the whole pattern shifts to higher ℓ\ell with its shape and heights intact; the larger ΩΛ\Omega_\Lambda adds a little late ISW power at the lowest ℓ\ell. On the plot this is the cleanest change of position of any slider. Try: move H0H_0 and compare 100 θ∗100\,\theta_* with the peak positions.

Optical depth τ\tau

How opaque the universe was to CMB photons after the first stars ionized the gas again: the chance that a photon scattered on its way to us.

Physics

The first stars and galaxies reionized the gas. Free electrons appeared again and scattered a fraction of the CMB photons on their way to us. Those photons are knocked out of the direction they came from, and their small-scale anisotropy is smeared out, so everything inside the horizon scale at that time is dimmed, and all peaks are lower by the same factor. But the same scattering of the large-scale temperature quadrupole polarises the light, so a new polarisation signal appears at the largest angles, where recombination produces essentially none.

What to expect

For ℓ≳20\ell \gtrsim 20 the amplitude is scaled by Cℓ→e−2τCℓC_\ell \to e^{-2\tau}C_\ell in TT and EE, and TE by e−2τe^{-2\tau} too, with no change of shape. At low ℓ\ell the E-mode amplitude is linear in τ\tau, so the reionization bump of EE grows as CℓEE∝τ2C^{EE}_\ell \propto \tau^2, and the low-ℓ\ell TE grows as ∝τ\propto \tau. Only the combination Ase−2τA_s e^{-2\tau} is fixed by the high-ℓ\ell spectra; the low-ℓ\ell EE bump breaks the degeneracy. Try: raise τ\tau in EE and watch the bump rise while the peaks fall.

Spectral index nsn_s

How the strength of the primordial fluctuations changes with scale: ns=1n_s = 1 would be the same on all scales.

Physics

Inflation stretched quantum fluctuations to cosmic size, and because the expansion rate slowly changed during it, the fluctuations that left the horizon earlier (large scales) are not quite the same strength as those that left later (small scales). nsn_s is the measure of this slow tilt: Planck sees slightly more power on large scales (ns<1n_s < 1). In the CMB, scale is angle: the large scales are the low multipoles, the small ones the high multipoles.

What to expect

A tilt about ℓ≈700\ell \approx 700 that does not move any peak: to first order Dℓ→Dℓ (ℓ/700)ΔnsD_\ell \to D_\ell\,(\ell/700)^{\Delta n_s}, for instance Dℓ∝ℓ ns−1D_\ell \propto \ell^{\,n_s - 1} on the Sachs-Wolfe plateau. A larger nsn_s lowers the plateau and raises the peaks beyond the pivot and the damping tail, equally in TT, EE and TE. Try: raise nsn_s and compare the plateau with the 3rd peak.

Primordial amplitude AsA_s

The overall strength of the initial fluctuations laid down by inflation, at one reference scale.

Physics

It is the starting amplitude from which all the physics above grows. It does not change the dynamics, only the scale of the result: a louder start gives a louder sky at every angle. The photons then carry that amplitude through the plasma, so the shape of the spectrum is set by the other parameters and the height by AsA_s. Gravitational lensing, which redistributes power between scales, also depends on it, because the lensing deflections are themselves made by the same fluctuations.

What to expect

The primary Cℓ→(As′/As) CℓC_\ell \to (A_s'/A_s)\,C_\ell at every ℓ\ell, an offset of ln⁡Dℓ\ln D_\ell with no change of shape or position. The lensed spectra scale a little faster than linearly, mostly in the peak smoothing and in the damping tail, which is why the emulator treats AsA_s as a fitted variable rather than a factor. At ℓ≳20\ell \gtrsim 20 it is degenerate with τ\tau through Ase−2τA_s e^{-2\tau}. Try: raise AsA_s and τ\tau together and see TT hold at high ℓ\ell while EE moves at low ℓ\ell.

Flatness fixes the dark-energy density, ΩΛ=1−Ωb−Ωc−Ων−Ωr\Omega_\Lambda = 1 - \Omega_b - \Omega_c - \Omega_\nu - \Omega_r, with the neutrinos and the radiation taken out as CAMB does. It is shown under the sliders (0.685 for the Planck model). It has no slider, but it enters twice: through DA(z∗)D_A(z_*), hence the peak positions, and through the late ISW effect, ∫(Φ′+Ψ′) dη\int (\Phi' + \Psi')\,d\eta as the potentials decay at z≲1z \lesssim 1, which adds power to TT at ℓ≲30\ell \lesssim 30.

02 How it works without a solver

A Boltzmann code takes seconds per model, too slow for a slider. So the spectra are calculated ahead of time on a grid of models and the page interpolates between them.

Step 1

A grid of real calculations

CAMB, a Boltzmann code, was run offline for 5,625 models: 5 values each of ωb=Ωbh2\omega_b = \Omega_b h^2, ωc=Ωch2\omega_c = \Omega_c h^2, H0H_0 and τ\tau, and 3 each of nsn_s and AsA_s. Only the fitted result is shipped (270 KB), not the code or the runs.

Step 2

The peaks are lined up first

Changing H0H_0, ωb\omega_b or ωc\omega_c moves the acoustic peaks to other ℓ\ell, because it changes the angular size θ∗\theta_* of the sound horizon. Fitting curves whose peaks sit in different places would smear them, so every curve is stored against x=ℓ θ∗x = \ell\,\theta_* (for ℓ>20\ell > 20) and θ∗\theta_* is fitted as well.

Step 3

The right quantity is fitted

TT and EE are fitted as ln⁡Dℓ\ln D_\ell, and TE as the correlation r=TE/TT⋅EEr = TE/\sqrt{TT \cdot EE}, which stays between −1-1 and 11 and does not cross zero as sharply as TE itself. AsA_s is divided out exactly and put back, since the unlensed spectra scale with it; the fit only has to carry what lensing adds. τ\tau and AsA_s enter through their logarithms, because the low-ℓ\ell EE bump goes as τ2\tau^2.

Step 4

A polynomial replaces the solver

The curves are reduced to 24 principal components per spectrum. The coefficient of each component, and θ∗\theta_*, is a degree-4 polynomial in the six parameters (196 Chebyshev terms), fitted by least squares to the 5,625 models. The browser evaluates the polynomials and rebuilds the curve: a few milliseconds, so the sliders move the plot continuously.

03 How accurate it is

I compared the emulator with 200 new CAMB runs at random parameters inside the box, over ℓ=2\ell = 2 to 25002500. The table gives the 95th-percentile error, as a fraction of the value (for TE, of TT⋅EE\sqrt{TT \cdot EE}). Interpolating between the grid nodes, which I tried first, was about four times less accurate than the polynomial (0.16% against 0.02–0.07% at ℓ>200\ell > 200) and its data four times larger.

Spectrumℓ 2–30ℓ 30–200ℓ 2000–2500
TT0.04%0.02%0.04%
EE10%*0.25%0.07%
TE1.8%0.13%0.04%

Between ℓ=200\ell = 200 and 20002000 the 95th-percentile error is under 0.1% for all three. *The weak spot is EE at ℓ≲30\ell \lesssim 30, around ℓ≈9\ell \approx 9–10, where EE falls to about 10−3 μK210^{-3}\,\mu\mathrm{K}^2, against about 0.05 μK20.05\,\mu\mathrm{K}^2 in its reionization bump, so the error cannot be seen on the plot (the 10% is a relative error of that tiny value). At every ℓ\ell, cosmic variance, the limit of what the sky can tell us, is far larger than these errors. Beyond the fitted box the sliders stop. The box is ωb=Ωbh2=0.020\omega_b = \Omega_b h^2 = 0.020–0.0250.025, ωc=Ωch2=0.10\omega_c = \Omega_c h^2 = 0.10–0.140.14, H0=60H_0 = 60–8080, τ=0.02\tau = 0.02–0.120.12, ns=0.92n_s = 0.92–1.001.00 and As=1.5A_s = 1.5–3.0×10−93.0 \times 10^{-9}; at H0=67.4H_0 = 67.4 that is Ωb=0.044\Omega_b = 0.044–0.0550.055 and Ωc=0.22\Omega_c = 0.22–0.310.31. The model is flat, with a neutrino mass sum of 0.06 eV and no tensor modes.

04 Credits

The spectra were computed with CAMB (Lewis, Challinor & Lasenby 2000, ApJ 538, 473). The reference model uses the Planck 2018 best-fit values (Planck Collaboration 2020, A&A 641, A6, TT,TE,EE+lowE+lensing).