---
title: "Stellar Absorption Lines Interactive Lab | Sandbox Physics"
description: "Why does the same spectral line deepen, broaden or move? A line shifts when the gas moves along our view."
canonical_url: "https://sandboxphysics.com/labs/stellar-absorption-lines/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/stellar-absorption-lines/"
last_modified: "2026-10-28"
---

AC03 · Light through a stellar layer

# Stellar Absorption Lines

**Why does the same spectral line deepen, broaden or move?** A line shifts when the gas moves along our view. Its depth depends on how much light the gas absorbs and emits, and its width reflects atomic motion and the instrument. Once the center saturates, extra absorbers mainly widen the line.

Drag the glowing atmosphere to change its motion. Warm the layer, add absorbing atoms and watch the same two lines emerge in a calibrated detector strip.

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

Model assumptions

A uniform plane-parallel LTE slab lies in front of a 6000-kelvin blackbody, viewed along its normal. The two artificial transitions have vacuum rest wavelengths of 500 and 500.12 nanometres, an atomic mass of 56 atomic mass units, a four-level LTE reservoir with unit statistical weights. The common lower level lies two electronvolts above ground; each upper level is separated from it by the photon energy of its own transition. Net absorption includes stimulated emission. The ion stage is held fixed. Column scale multiplies a prescribed reference opacity; it is not an elemental abundance. The line source function is the Planck function at the slab temperature. Thermal and prescribed microturbulent Gaussian broadening are included, followed by a normalized Gaussian instrument response. Rotation, pressure wings, scattering, non-LTE populations, depth gradients and disk integration are omitted. Ray positions, colors, atmosphere thickness and motion are schematic; the spectrum intensity is calculated. The narrow wavelength band uses exaggerated display colors.

## Depth, width and motion leave different clues

Gold: intrinsic slab prediction. Cyan: the same intensity after the spectrograph response. These are synthetic predictions.

Intensity divided by the background continuum$I_\lambda/I_{\lambda,c}$

Equivalent width of both lines; negative means emission$W_\lambda=\int(1-I_\lambda/I_{\lambda,c})\,d\lambda\quad[\mathrm{pm}]$

Transfer law and fixed approximations

$$
\frac{I_\lambda}{I_{\lambda,c}}=e^{-\tau_\lambda}+\frac{B_\lambda(T)}{B_\lambda(6000\,\mathrm K)}(1-e^{-\tau_\lambda})
$$

The line opacity is the sum of two Gaussian transitions with strengths one and 0.42. Their fixed ion stage has a four-level LTE reservoir with upper-minus-lower energies matched to the photon wavelengths and net opacity including stimulated emission; the mass is 56 atomic mass units and microturbulent speed is two kilometres per second. No real atomic abundance is fitted. The first-order Doppler shift is used within sixty kilometres per second.

[Krumholz, radiative transfer I: equations 24–28](https://www.mso.anu.edu.au/~krumholz/teaching/astr8003_s1_2019/notes1.pdf) · [NRAO, transfer and LTE source function](https://www.cv.nrao.edu/~sransom/web/A5.html)

Physics tutorial

## What a dark line tells us

**Background** Hot material below a stellar atmosphere supplies a bright continuum. At a selected wavelength the atoms above it absorb and emit strongly. The brightness we receive depends on both processes.

**Why it matters** A shifted line measures motion, but its depth is also sensitive to temperature and how many atoms occupy the absorbing state. Comparing these effects keeps a strong line from being mistaken for a precise abundance.

Start with the essentials

- **Focus question**: What happens when the absorbing layer becomes as hot as the background?
- **One-sentence intuition**: A layer makes an absorption line only when its source brightness is lower than the background along the same ray.

### Core mathematical model

#### Absorption and emission through one layer

$$
I_\lambda=I_{\lambda,c}e^{-\tau_\lambda}+B_\lambda(T)(1-e^{-\tau_\lambda})
$$

Optical depth is measured along the outward normal ray. The first term is transmitted background light; the second is emission by the uniform LTE layer.

#### Moving the line

$$
\lambda_c\simeq\lambda_0(1+v_r/c)
$$

Radial velocity is positive away from the observer. The model uses a first-order shift at speeds much smaller than light speed.

#### The missing area

$$
W_\lambda=\int\left(1-\frac{I_\lambda}{I_{\lambda,c}}\right)d\lambda
$$

The area is expressed as a width in wavelength. Emission gives a negative value under this convention.

### Common difficulties

#### A deeper line and more atoms

**Typical misconception** Doubling the number of absorbers always doubles the line depth.

**Better mental model** A saturated center already receives almost none of the background. Extra absorbers broaden the opaque part; the layer still emits its own light.

### Run the experiment

1. 01

   #### Saturate the center

   Compare Cool absorbing layer with The center saturates.

   **What to observe:** The center stops deepening rapidly while the wings widen. The growth curve bends.

2. 02

   #### Move both lines together

   Drag the gold handle below the layer, then choose The whole pattern shifts.

   **What to observe:** Both centers shift by the same fractional wavelength; their fixed separation still identifies the pattern.

3. 03

   #### Replace absorption with emission

   Warm the layer through six thousand kelvin or choose A hotter layer emits.

   **What to observe:** The line first disappears when both source brightnesses match, then becomes bright.

Physical conclusion

Use line position for motion, line shape for broadening, and a transfer model for depth. Equivalent width helps compare blurred spectra, provided the continuum and full line window are correct.

## Related experiments and articles

Continue exploring

### Measuring the sky

What do positions, colors, interference and radio delays reveal about the sky?

1. [Lab **Observing Cadence and Aliases** Move exposures and compare the rhythms that survive the sampling.](https://sandboxphysics.com/labs/observing-cadence-aliases/)
2. [Lab **Supernova Distances and the Distance Ladder** Move a geometric distance anchor and follow its shared calibration error.](https://sandboxphysics.com/labs/supernova-distance-expansion/)
3. [Lab **Stellar Parallax and Proper Motion** Change the stellar distance and follow its annual motion.](https://sandboxphysics.com/labs/stellar-parallax-proper-motion/)
4. [Lab **Crowded-star Photometry** Move the aperture and compare the light admitted from neighbouring stars.](https://sandboxphysics.com/labs/crowded-star-photometry/)
5. [You are here **Stellar Absorption Lines** Change the gas temperature and velocity, then compare the absorption lines.](https://sandboxphysics.com/labs/stellar-absorption-lines/)
6. [Lab **Galaxy Colors and Photometric Redshift** Compare redshift, dust and stellar-population effects in the same five bands.](https://sandboxphysics.com/labs/galaxy-colors-photometric-redshift/)
7. [Lab **Stellar Interferometry and Sparse Imaging** Move a telescope and compare images fitted to the same sparse signals.](https://sandboxphysics.com/labs/stellar-interferometer/)
8. [Lab **Interstellar Radio Propagation** Change the electron column and field, then follow the arriving radio pulse.](https://sandboxphysics.com/labs/interstellar-radio-propagation/)

Reading stellar absorption lines · Reading path

### Reading stellar absorption lines

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

1. [Article **What dark lines in starlight tell us**](https://sandboxphysics.com/stories/stellar-spectroscopy/why-starlight-has-dark-lines/)
2. [Article **Separate line position from line width**](https://sandboxphysics.com/stories/stellar-spectroscopy/wavelength-motion-and-width/)
3. [Article **Put absorption and emission in one equation**](https://sandboxphysics.com/stories/stellar-spectroscopy/absorption-emission-and-growth/)
4. [Article **From emergent intensity to a fitted spectrum**](https://sandboxphysics.com/stories/stellar-spectroscopy/from-intensity-to-a-fitted-spectrum/)
5. [Article **Fit a frozen calibrated stellar spectrum**](https://sandboxphysics.com/stories/stellar-spectroscopy/fit-a-frozen-calibrated-spectrum/)
6. [Article **Read a 3D non-LTE abundance paper**](https://sandboxphysics.com/stories/stellar-spectroscopy/read-a-3d-non-lte-abundance-paper/)

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)
