---
title: "Lyman-alpha Forest: Gas, Velocities and Absorption Interactive Lab | Sandbox Physics"
description: "Why does one beam of quasar light acquire a forest of dark lines? Neutral hydrogen removes light near its Lyman-alpha transition."
canonical_url: "https://sandboxphysics.com/labs/lyman-alpha-sightline/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/lyman-alpha-sightline/"
last_modified: "2026-11-11"
---

A quasar beam through intergalactic hydrogen

# Lyman-alpha Forest: Gas, Velocities and Absorption

**Why does one beam of quasar light acquire a forest of dark lines?** Neutral hydrogen removes light near its Lyman-alpha transition. Expansion and gas motion shift the absorption from different places to different wavelengths. Density sets how much hydrogen contributes, while temperature changes both the neutral fraction and line width.

Drag a beam through a three-dimensional gas field. Follow the same hydrogen into real-space density, recession velocity and a transmitted spectrum.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

This finite prescribed gas screen does not evolve cosmic structure. Its spectrum contains absorption inside the cube; a separate exercise uses an observed SDSS spectrum.

Physics tutorial

## Turn a patch of gas into a dark line

**Background** A distant quasar supplies a bright background. Hydrogen between it and the observer removes a narrow range of colours. Each patch has its own recession speed, so its missing light appears at a different place in the spectrum.

**Why it matters** The spectrum is easy to measure, but it does not directly show where the gas is. Moving one ray through a known field lets us see what information was folded together.

Start with the essentials

- **Focus question**: Which gas makes the dip you selected?
- **One-sentence intuition**: Several places can absorb at the same spectral velocity. Temperature spreads each contribution, and their optical depths add before the light is attenuated.

### Core mathematical model

#### Neutral fraction in the declared hydrogen model

$$
\Gamma_{\mathrm{photo}}n_{\mathrm{HI}}=\alpha(T)n_e n_p
$$

Ionization removes neutral atoms while recombination restores them. This screen assumes pure hydrogen and a uniform radiation background.

#### Thermal width

$$
b=\sqrt{\frac{2k_{\mathrm B}T}{m_{\mathrm H}}}
$$

Hotter atoms have a wider spread of velocities. Their absorption spreads even when the gas positions stay fixed.

#### Positions become spectral velocities

$$
u(x)=aH x+v_x(x)
$$

Position is comoving; the scale factor converts its expansion contribution. Peculiar motion can crowd several locations into the same velocity. The display camera does not set this direction.

#### Add absorption along the ray

$$
\tau(v)=\int n_{\mathrm{HI}}(x)\,\sigma_v[v-u(x)]\,a\,\mathrm dx,\qquad F(v)=e^{-\tau(v)}
$$

The full Voigt cross section includes thermal and natural broadening. Forward integration stays finite when the velocity map folds; it does not invert that map.

### Common difficulties

#### One dark line, one cloud?

**Typical misconception** A dip identifies one object at one known distance.

**Better mental model** Several patches can share a recession velocity, and thermal wings overlap. The selected wavelength marks a combined contribution.

#### Temperature versus pressure history

**Typical misconception** Turning the temperature control also smooths away small gas structures.

**Better mental model** Here it changes neutral abundance and line width only. Pressure smoothing requires an evolved thermal history, which this fixed field does not compute.

### Run the experiment

1. 01

   #### Follow a dip

   Select a dark part of the spectrum, then drag the source across the cube.

   **What to observe:** The ray, density profile, velocity map and missing light change together.

2. 02

   #### Heat the same gas

   Compare the cold and hot presets without changing the sightline.

   **What to observe:** Lines broaden while hydrogen becomes less neutral. Both changes affect the transmitted light.

3. 03

   #### Crowd velocities

   Compare zero peculiar velocity with the crowded preset.

   **What to observe:** The spatial gas field stays put while the velocity map bends and can fold. A stronger dip need not mean an extra object.

Physical conclusion

The forest is a view of gas through ionization, temperature and motion. Reading density from it requires keeping those influences in the same calculation.

## Related experiments and articles

The Lyman-alpha forest · Reading path

### From hydrogen to forest spectra

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why quasar light contains a forest of dark lines**](https://sandboxphysics.com/stories/lyman-alpha-forest/why-quasar-light-holds-a-forest/)
2. [Article **Did the gas get hotter, or more strongly ionized?**](https://sandboxphysics.com/stories/lyman-alpha-forest/temperature-and-ionization/)
3. [Article **From a patch of hydrogen to an absorption spectrum**](https://sandboxphysics.com/stories/lyman-alpha-forest/from-hydrogen-to-an-absorption-line/)
4. [Article **When different places share one spectral velocity**](https://sandboxphysics.com/stories/lyman-alpha-forest/when-several-places-share-one-velocity/)
5. [Article **Recompute transmission from one fixed SDSS sightline**](https://sandboxphysics.com/stories/lyman-alpha-forest/recompute-a-fixed-sdss-sightline/)
6. [Article **Read a thermal history in small-scale velocity gradients**](https://sandboxphysics.com/stories/lyman-alpha-forest/read-pressure-history-in-small-scale-velocities/)

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
