---
title: "Optical depth and the visibility function"
description: "Adding up scatterings off free electrons gives where background light last scattered: a shell near redshift 1081, about 200 wide in this model."
canonical_url: "https://sandboxphysics.com/stories/cosmic-transparency/optical-depth-and-the-visibility-function/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/cosmic-transparency/optical-depth-and-the-visibility-function/"
last_modified: "2026-11-12"
---

[How the universe became transparent](https://sandboxphysics.com/stories/cosmic-transparency/)

# Optical depth and the visibility function

Sandbox Physics · 2026-11-12

The visibility function gives the probability that a background photon we receive today scattered for the last time at each redshift. It comes from adding up how often photons hit free electrons on their way to us. With the three-level history of the previous chapter, it peaks at redshift 1081 and has a full width of about 200, so the microwave sky is a thick shell rather than a sharp surface. A small energy release during recombination keeps more electrons free and moves the whole shell to later times.

Read [Saha balance and the recombination bottleneck](https://sandboxphysics.com/stories/cosmic-transparency/saha-and-the-recombination-bottleneck/) first. You need the free-electron fraction $x(z)$, exponentials, and integrals as sums over many small steps. The aims are to build the optical depth from a scattering rate, turn it into a probability, and test what an energy release does to it.

## Scattering off free electrons

A photon of these energies scatters off a free electron with the Thomson cross-section $\sigma_{\mathrm T}=6.65\times10^{-29}\,\mathrm{m^2}$, which does not depend on frequency. Neutral hydrogen scatters far less at these photon energies, so only free electrons count. One photon then meets electrons at the rate

$$
\Gamma=c\,\sigma_{\mathrm T}\,n_{\mathrm e},\qquad n_{\mathrm e}=x\,n_{\mathrm H}.
$$

At $z=1100$, with $x=0.142$ and $n_{\mathrm H}=2.54\times10^{8}\,\mathrm{m^{-3}}$, the electron density is $3.61\times10^{7}\,\mathrm{m^{-3}}$ and $\Gamma=7.20\times10^{-13}\,\mathrm{s^{-1}}$. The expansion rate at that time is $H=5.13\times10^{-14}\,\mathrm{s^{-1}}$. The ratio $\Gamma/H=14.0$ is the number of scatterings while the universe grows by a factor of $\mathrm e$. Put differently, the mean free path $c/\Gamma$ is about 13,500 parsecs, while the distance light covers in one expansion time, $c/H$, is about 190,000 parsecs.

## Adding up the optical depth

Follow one photon from redshift $z$ down to today. Over a short step $\mathrm ds$ in $s=\ln(1+z)$ it spends a time $\mathrm ds/H$, so the expected number of scatterings in that step is $\Gamma\,\mathrm ds/H$. The total is the optical depth

$$
\tau(z)=\int_0^{\ln(1+z)}\frac{c\,\sigma_{\mathrm T}\,n_{\mathrm e}}{H}\,\mathrm ds'.
$$

When scatterings are independent, the chance of making the whole trip without one is $\mathrm e^{-\tau}$, the same rule as for radioactive survival. At $z=1100$ the model gives $\tau=1.10$, so only a third of photons that set out then arrive unscattered. At $z=1300$, $\tau=7.3$ and almost none do.

This model holds the free fraction at its last solved value below redshift 50 and leaves out reionization by the first stars. Planck measured that late contribution as $\tau=0.054\pm0.007$. [Planck Collaboration, 2018, abstract](https://arxiv.org/abs/1807.06209v4) It lowers $\mathrm e^{-\tau}$ by the same factor for every redshift above reionization, so it rescales what follows and leaves the peak where it is.

## The visibility function

The probability of last scattering between $z$ and $z+\mathrm dz$ is the chance of scattering in that interval times the chance of reaching us without another scattering:

$$
g(z)=\mathrm e^{-\tau(z)}\frac{\mathrm d\tau}{\mathrm dz}=-\frac{\mathrm d}{\mathrm dz}\mathrm e^{-\tau(z)}.
$$

The second form makes two checks possible without new physics. First, the integral between two redshifts is a difference of survival probabilities:

$$
\int_{z_1}^{z_2}g\,\mathrm dz=\mathrm e^{-\tau(z_1)}-\mathrm e^{-\tau(z_2)}.
$$

From $z=50$ to $1800$, where $\tau$ runs from $1.93\times10^{-4}$ to $53.6$, this predicts $0.999807$. The trapezoid sum of the tabulated $g$ gives $0.999804$. Second, setting $\mathrm dg/\mathrm dz=0$ gives the peak condition $\mathrm d^2\tau/\mathrm dz^2=(\mathrm d\tau/\mathrm dz)^2$. The peak therefore need not sit at $\tau=1$. In this model it lies at $z=1081$, where $\tau=0.88$, and $\tau=1$ falls at $z=1092$.

**Table 3.1** Visibility summaries from the saved [recombination output](https://sandboxphysics.com/stories/cosmic-transparency/materials/recombination-output.json).

| History | Peak redshift | Redshift where the optical depth reaches one | Full width at half maximum |
| --- | --- | --- | --- |
| Three-level atom | $1081.0$ | $1092.0$ | $203$ |
| HyRec-2 file, below redshift 1600 | $1080$ | $1089.8$ | $204$ |
| Delayed last scattering preset | $1037.0$ | $1051.9$ | $223$ |

Planck reports $z_\ast=1089.92\pm0.25$. [Planck Collaboration, 2018, Table 2](https://arxiv.org/abs/1807.06209v4) We have not checked in that paper that its $z_\ast$ uses exactly the optical-depth-equals-one definition, so treat the match with the HyRec-2 row as a check of scale rather than a precision test. The three-level atom lands two units higher.

## Energy released during recombination

Now add energy at a rate that sums to a fraction $\Delta\rho/\rho_\gamma$ of the photon energy. At $z=1100$ the photons carry $1.51\times10^{9}\,\mathrm{eV}$ per hydrogen nucleus, so even $\Delta\rho/\rho_\gamma=5\times10^{-9}$ amounts to $7.6\,\mathrm{eV}$ per nucleus, comparable to the energy that holds an atom together.

Chen and Kamionkowski split the deposited energy into ionization, excitation and heat, with shares $(1-x)/3$, $(1-x)/3$ and $(1+2x)/3$. [Chen and Kamionkowski, 2004, equation 14](https://arxiv.org/abs/astro-ph/0310473v4) Ionization energy frees one electron per $13.6\,\mathrm{eV}$. Excitation energy lifts atoms to $n=2$ at $10.2\,\mathrm{eV}$ each, and each such atom is then ionized with probability $1-C$. With $C=0.019$ at $z=1100$, almost every excitation also becomes an ionization. If the whole $7.6\,\mathrm{eV}$ arrived at $x=0.142$, it would supply about $0.16$ direct and $0.21$ excitation-led ionizations per nucleus. Most recombine again, but the net free fraction stays higher.

In their equation 21 the Lyman-alpha term is printed with the factor $C-1$, and read with their equation 15 as printed it would lower the ionization. The probability argument above gives $1-C$, which is what the model uses. The derivation is written out in the [materials README](https://sandboxphysics.com/stories/cosmic-transparency/materials/README.md).

The Delayed last scattering preset releases $\Delta\rho/\rho_\gamma=5\times10^{-9}$ centred on redshift 1100. Table 3.1 shows the result: the peak moves from 1081 to 1037 and broadens by 20. The spectrum barely changes, with a $y$ of only $6.4\times10^{-10}$. Such releases are therefore tested with maps of the microwave sky.

## Lab tasks

Open the [recombination Lab](https://sandboxphysics.com/labs/recombination-spectral-distortions/). The fog on the stage shows the local scattering rate, and the vertical line marks the visibility peak.

1. Predict which way the peak moves when the release epoch is dragged from redshift 1100 to 1500 at fixed amplitude. Then check, and explain the result using the free fraction at 1500.
2. With the Delayed last scattering preset, raise the amplitude by a factor of ten. Does the peak shift ten times further? Use the recombination term $x^2$ to explain what you see.
3. Compare the cyan and green visibility curves. Which part of the curve, high or low redshift, changes most, and why?

## Exercises

1. Show that $\int_0^\infty g\,\mathrm dz=1$ when $\tau$ grows without limit at high redshift.
2. Derive the peak condition $\mathrm d^2\tau/\mathrm dz^2=(\mathrm d\tau/\mathrm dz)^2$.
3. At $z=1000$ the model gives $x=0.0472$. Estimate $\Gamma/H$ there, using $H\propto(1+z)^{3/2}$ as a rough scaling from $z=1100$.
4. Reionization adds $0.054$ to the optical depth of every photon from beyond redshift ten. By what factor does it reduce the height of $g$ near redshift 1081?

Answers

1. From the second form of $g$, the integral is $\mathrm e^{-\tau(0)}-\lim\mathrm e^{-\tau}=1-0=1$. Every photon we receive has a last scattering somewhere.
2. Differentiate $g=\mathrm e^{-\tau}\tau'$ to get $\mathrm e^{-\tau}(\tau''-\tau'^2)$, where primes mean derivatives in $z$. Setting it to zero gives the condition.
3. $n_{\mathrm H}$ scales as $(1+z)^3$, so $\Gamma/H$ scales as $x(1+z)^{3/2}$. From $z=1100$: $14.0\times(0.0472/0.142)\times(1001/1101)^{3/2}\simeq4.0$. The model gives $4.08$; the small difference comes from radiation, which makes $H$ fall slightly faster than the scaling.
4. By $\mathrm e^{-0.054}\simeq0.947$, about five per cent, while leaving the shape unchanged.

## Sources

1. [Planck Collaboration, 2018, abstract](https://arxiv.org/abs/1807.06209v4)
2. [Chen and Kamionkowski, 2004, equation 14](https://arxiv.org/abs/astro-ph/0310473v4)

## Keep reading

How the universe became transparent · Reading path

### From a blackbody to limits on hidden energy

1. [Article **What can tiny departures from a perfect blackbody record?**](https://sandboxphysics.com/stories/cosmic-transparency/a-nearly-perfect-blackbody/)
2. [Article **Saha balance and the recombination bottleneck**](https://sandboxphysics.com/stories/cosmic-transparency/saha-and-the-recombination-bottleneck/)
3. [You are here **Optical depth and the visibility function**](https://sandboxphysics.com/stories/cosmic-transparency/optical-depth-and-the-visibility-function/)
4. [Article **Thermalization, chemical-potential and Compton distortions**](https://sandboxphysics.com/stories/cosmic-transparency/thermalization-mu-and-y/)
5. [Article **Comparing Saha, a three-level atom and a frozen CLASS reference**](https://sandboxphysics.com/stories/cosmic-transparency/compare-recombination-codes/)
6. [Article **How to read the decaying dark matter limits of Lucca and colleagues**](https://sandboxphysics.com/stories/cosmic-transparency/reading-energy-injection-limits/)
