Read the mass-sheet chapter first. This is a check of the scaling relations on real inputs. It is not the paper's hierarchical inference, which uses stellar kinematics, orbit anisotropy and full posteriors.
Get the files
Put these five files in one empty folder:
Then run:
python3 reproduce.py --check
The script needs only the Python standard library. We ran it with Python 3.9.6. It prints the tables below, writes outputs.json in the current folder and exits with status 1 if the rounded outputs differ from expected-outputs.json.
The input: Table 2 of TDCOSMO IV
TDCOSMO IV, Birrer et al. 2020, arXiv version 3, published in A&A 643, A165. Table 2 lists for each lens the redshifts, Einstein radius, power-law slope γpl, external convergence κext and the time-delay distance DΔtpl of the power-law model. The caption says DΔtpl comes from imaging and time delays and does not include external convergence or internal mass-sheet terms. That is exactly the quantity the mass sheet acts on. TDCOSMO IV, Sec. 5.1 and Table 2
Each value is stored as a list of three numbers: the median, the lower error and the upper error. We transcribed the table by hand from the ar5iv HTML rendering; check a digit against the PDF before relying on it.
Step 1: one lens, one Hubble constant
For flat ΛCDM the time-delay distance is proportional to 1/H0 at fixed redshifts and Ωm. So compute DΔt at H0=70 km s−1 Mpc−1 and Ωm=0.3, by integrating 1/E(z) numerically, and scale:
The error is the mean half-width of the DΔtpl interval, carried as a fraction.
Step 2: the line of sight
The measured distance is the lens-specific one, DΔtlens=(1−κext)DΔtbkg (Eq. 32). Cosmology predicts the smooth-universe distance, so H0→(1−κext)H0pl, with the κext error added in quadrature.
The inverse-variance mean of the last column is 74.2±1.6.
Step 3: an internal mass sheet
The total transform is λ=(1−κs)λint and H0,λ=λH0 (Eqs. 29 and 34). Multiply by the population means of Table 6:
TDCOSMO IV, Table 6 H0LiCOW XIII, abstract
The middle row is 1.2 above the paper. Our shortcut multiplies a fixed λint into a fixed combined H0; the paper infers λint, the anisotropy and H0 together from the kinematics and lets λint vary with the ratio of each lens's half-light radius to its Einstein radius. We did not reproduce that inference, so do not read the agreement in the last row as more than a check of the scaling. What the table does show is the size of the effect: a 9 percent sheet moves H0 by about 7 units.
Step 4: slope and matter density
Slope. At fixed image positions the predicted delay scales close to γ′−1 (Kochanek 2002, Eq. 8), so the inferred H0 does too. Shifting every slope by +0.05 raises the combined value by 5.3 percent; −0.05 lowers it by 5.3 percent. This is a rough guide, not a refit. In a real model a slope change also moves the other parameters. Kochanek 2002, Sec. 2.1
Matter density. Changing Ωm from 0.3 to 0.25 raises the result by 0.2 percent; changing it to 0.35 lowers it by 0.3 percent. The time-delay distance is a ratio of distances times 1+zd, and most of the dependence on the expansion history cancels.
Failure cases
- Ignore the line of sight. Setting κext=0 gives 76.8. The sample mean κext is positive, 0.035 (TDCOSMO IV, Sec. 5.1), so leaving it out biases H0 upward.
- Trust one lens. RXJ1131−1231 alone gives 78.1±3.2. Its small distance error hides the model and environment errors that only show up across a sample.
- Drop the lens H0LiCOW did not use. Without DES0408−5354 the remaining six give 73.9, close to the H0LiCOW XIII value from the same six lenses.
- Treat asymmetric errors as Gaussian. We do this throughout. For B1608+656 the κext interval is −0.045/+0.084, and averaging it understates the chance of a large correction.
- Edit an input. Change a distance or a κext in the JSON and the --check run fails. Any edit breaks the checksums in provenance.json.
What this does not show
Image positions alone cannot fix H0: every number here starts from distances that already include measured delays. Stellar kinematics fix λint in the paper; here we copied λint in. Line-of-sight corrections come from the paper's per-lens κext posteriors, which we reduced to two numbers each.
A checklist for the next lensing paper
- Find which time-delay distance a table lists: with or without external convergence, with or without an internal sheet.
- Find which mass profile it assumes, and how the slope uncertainty enters.
- Find where λ comes from: an assumed profile, kinematics, or an external sample with its own selection.
- Check how much the result moves when κext is set to zero, as a sense of scale.
- Separate what is measured (delays, image positions, velocity dispersions) from what is assumed (profile shape, anisotropy, the parent population).
The next page reads TDCOSMO IV section by section: how to read TDCOSMO IV.