Skip to content
Tutorials Center
My learning

Topics

Lesson 44 of 48 Β· Projects and Practice

Project: Build the Cosmic Distance Ladder

Build a four-rung distance ladder in Python with simulated data: parallax, Cepheids, Type Ia supernovae and the Hubble flow, and see how errors carry from one rung to the next.

How do you measure the distance to something you can never visit? Astronomers cannot use a tape measure, so they build a ladder: each rung works over a range of distances and is calibrated by the rung below. The top rung gives the Hubble constant. In this project you will build the whole ladder in Python, using simulated data so that you know the right answer and can check how well your method recovers it.

This is the same logic used by the teams that found the Hubble tension in chapter 8. The simulated numbers are labeled as simulations; the physics (the Leavitt law, the supernova luminosity, the Hubble law) is real.

What you will learn

  • How the four rungs connect, and why errors accumulate.
  • How to calibrate a period-luminosity relation from parallaxes.
  • How to turn supernova magnitudes into a Hubble constant.
  • How to quantify the uncertainty of the result.

Key terms

Parallax: the tiny shift in a star's position as Earth orbits the Sun; d (pc) = 1 / p (arcsec).

Cepheid variable: a pulsating supergiant whose period is tied to its luminosity (Henrietta Leavitt, 1912).

Zero point: the intercept of a calibration relation, found from objects of known distance.

Distance modulus: ΞΌ = m βˆ’ M = 5 log₁₀(d / 10 pc).

Error propagation: how an uncertainty in one step affects the final result.

Four rungs of the distance ladder: parallax, Cepheids, supernovae Ia and the Hubble flow, each calibrating the next.
Each rung of the ladder reaches farther, and each one depends on the one beneath it.

The plan

Rung Method What you measure What you learn
1 Parallax (Gaia) Tiny angular shifts Distances to nearby Cepheids
2 Cepheids Periods and magnitudes The Cepheid zero point, then the distance to a galaxy
3 Type Ia supernova One supernova in that galaxy The supernova's absolute magnitude
4 Hubble flow Supernovae at z of 0.02 to 0.08 The Hubble constant

The Leavitt law in the visual band is approximately M = βˆ’2.43 (log₁₀ P βˆ’ 1) βˆ’ 4.05, where P is the period in days. We assume the slope is known and fit only the zero point.

Step by step

Python The four-rung ladder with simulated data

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

What this simulation teaches

Errors accumulate. A 0.05 magnitude error in the Cepheid zero point makes every distance 2.3 percent too big or small, and so changes Hβ‚€ by 2.3 percent, however many supernovae you add at the top. That is why the SH0ES team spends most of its effort on the lowest rungs, and why independent ladders (the tip of the red giant branch, Mira variables, masers) are so valuable.

Systematics, not statistics, limit the answer. With 40 supernovae the printed statistical error on Hβ‚€ is under one percent, but the true uncertainty is several percent. The single calibrator supernova (scatter 0.12 magnitude, about 5.5 percent in distance) and the Cepheid zero point are common to every distance. Change the random seed and watch Hβ‚€ wander between about 65 and 76: that spread is the real error. Real ladders use dozens of calibrators to shrink it. The tension discussed in chapter 8 is at the level of 8 percent, so every step of the ladder must be controlled.

What the simulation left out. Real data have dust extinction, crowding of Cepheids in galaxy images, the metallicity dependence of the Leavitt law, selection effects, peculiar velocities of the supernova hosts and the Lutz–Kelker bias in parallaxes (using 1/p for a noisy p is biased). Real analyses model all of these.

Extensions

  1. Change the parallax error from 0.03 mas to 0.1 mas and watch the zero-point error grow. Which rung limits the answer?
  2. Add a 0.1 magnitude systematic offset to the Cepheid zero point and watch Hβ‚€ shift.
  3. Replace the mean of the Hubble-flow estimates with a weighted fit.
  4. Use d = 1/p only for stars with p/Οƒ_p > 10, and see how the bias changes.

Common misconceptions

"More supernovae will always reduce the error." Only the statistical part. Systematic errors in the lower rungs stay.

"Parallax works for any star." It works only for nearby ones; at 3 kpc the shift is 0.33 milliarcseconds, comparable to the measurement error.

"The distance ladder is circular." Each rung is calibrated by a physically independent one, anchored in geometry.

Try it

JS Parallax and distance, with a realistic error

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check Β· 5 questions

of 5 answered You scored / 5 Β· perfect!

  1. 1. Which rung calibrates the Cepheid period-luminosity relation?

    Parallaxes to nearby Cepheids give their luminosities, which sets the zero point.
  2. 2. A star has a parallax of 2 milliarcseconds. What is its distance?

    d = 1000 / 2 = 500 pc.
  3. 3. A 0.05 mag error in the Cepheid zero point changes all distances by about:

    A distance error is 10^(0.05/5) - 1, about 2.3 percent.
  4. 4. Why do systematic errors in the lower rungs matter so much?

    A common calibration error does not average away.
  5. 5. Where does the Hubble constant come from in the ladder?

    H0 = v/d for objects far enough that peculiar velocities are small.

Summary

  • The distance ladder chains parallax, Cepheids, Type Ia supernovae and the Hubble flow; each rung calibrates the next.
  • Systematic errors in the lower rungs propagate to Hβ‚€ and do not average away.
  • Simulations with a known truth are a good way to test an analysis.
  • Real analyses must handle dust, crowding, metallicity, selection effects and biases.

Next: Practice problem set