Skip to main content
Sandbox Physics
How the cosmic distance ladder acquires a scale

L3 · Cosmic distance ladder

Reproduce a correlated SH0ES distance-ladder subsystem

Download the public matrix, independent benchmark and Python script listed below. With Python 3 and its standard library you can reproduce the 87-row fit, inspect every retained source coefficient and compare three different zero-point shifts. The source is the SH0ES release at commit c447f0fea703fcd0fff57de5000947b5ca81286b; the fit is a fixed conditional subsystem, not the full published analysis.

Download three small files into an empty directory

No repository access is needed. The numerical input is about 152 KB and includes the selected observed column,87-by-eight design and 87-by 87 covariance. The script checks the exact input bytes with SHA256 before solving. The reference file was produced by an independent NumPy Cholesky and SVD calculation; the public script uses a separate standard-library implementation.

Run the commands from that new directory. The script writes public-reproduction.json and checks the baseline against the independent benchmark. The input checksum must be24b93d2ce7bdbcbfe9789ac35091dc5737e326beecedf0fa84a80d02ed287447. If a download is an HTML error page, checksum validation stops the calculation before it can be mistaken for data.

            mkdir shoes-small-example
cd shoes-small-example
for file in reproduce-subsystem.py shoes-subsystem.json shoes-subsystem-benchmarks.json; do
  curl --fail --location --output "$file" "https://sandboxphysics.com/stories/distance-ladder/$file"
done
python3 reproduce-subsystem.py --reference shoes-subsystem-benchmarks.json

          

Reading: PantheonPlusSH0ES DataRelease · Published article license

Trace the selection back to the original arrays

The original ally FITS image contains 3492 prepared observations. The alll image stores 47 parameter rows by 3492 observations; transpose it to obtain a usual observation-by-parameter design. The allc image contains the 3492-by 3492 covariance. Its ordinary raw GitHub link can return only a Git LFS pointer; the source manifest records the real media URL,48,781,440-byte length and SHA256 checksum.

The selection is fixed before examining its fitted Hubble value. Keep 24 evenly spaced matrix rows in the 259-row M101 block, all 15 Mrk 1337 Cepheids,24 evenly spaced rows in the 443-row NGC4258 block, the first five calibration rows 3130–3134, sixteen evenly spaced Hubble-flow rows 3215–3491, and constraint rows 3209,3212 and 3213. This gives 63 Cepheids, five calibration light-curve rows, sixteen flow rows and three constraints.

Each observation stores its zero-based original sourceRowIndex and every original nonzero coefficient. The only used source columns are 0,1,37,38,41,42,43 and 46. Both extraction and fit assert that all other columns are zero for these rows. The reduction therefore does not quietly fix an active nuisance parameter. Source row 0 also retains the measured catalogue ID 54672 and period 6.853491 days; Hubble-flow rows use the original matrix IDs as their verified identifiers.

Reading: PantheonPlusSH0ES DataRelease · Riess et al.

Read prepared values and constraints before fitting

The prepared Cepheid magnitudes already subtract the base period term−3.285 times the logarithmic period offset. Fit a slope correction, then add it back to−3.285 to report the physical slope. The printed Table 2 F160W magnitude is a separate rounded display quantity. table2.README warns that its errors omit the off-diagonal terms needed for refitting and that custom selections can need new artificial-star tests. This tutorial inherits the released covariance and photometric preparation.

Row 3209 is a released metallicity summary, approximately−0.215±0.120-0.215\pm0.120 magnitudes per dex. Row 3212 is a broad slope-correction regularizer, zero with standard deviation 10. Row 3213 is the geometric-anchor modulus offset, zero with standard deviation about 0.032391 magnitude. The full source covariance has zero cross-entries from these three rows to all other rows. That numerical fact does not make the summaries independently collected raw experiments: their construction belongs to the released global Cepheid analysis. We therefore call the result conditional and include a fit with the metallicity summary removed.

Reading: PantheonPlusSH0ES DataRelease · Riess et al.

Compare the saved baseline before changing anything

The standard-library script and independent NumPy reference agree on every fitted parameter within one hundred-millionth. The Hubble median is 66.3049059163 with the central one-sigma transformed interval 62.2355814993–70.6403064398. Chi-squared is 75.1994887236 and rank is eight. These are the numbers to reproduce; sample selection is not changed to bring the central value toward a preferred result.

The original 3492-row,47-parameter release was also solved separately using all of its covariance. Its Hubble value 73.0428191 matches the full-paper baseline 73.04 in Table 5. The small subsystem has only two calibrating supernova hosts and conditions on released summaries. Its wider interval and shifted centre are expected consequences of asking a smaller, differently conditioned question. The full-paper final±1.04\pm1.04 uncertainty also includes the authors’ analysis variants; it is not the error bar of this subset.

QuantityFrozen result
Hubble median, km/s/Mpc66.3049059163
Physical Cepheid slope, mag/dex−3.5186554275
Host-modulus correlation0.6352832389
Relative modulus, mag3.8409126358±0.10910285943.8409126358\pm0.1091028594

Reading: Riess et al. · PantheonPlusSH0ES DataRelease

Read each controlled failure in the output

The output includes an adopted-anchor shift, a host-only Cepheid shift and a common Cepheid shift, all of 0.10 magnitude. The first two lower the Hubble value to 63.32069 with identical residual chi-squared. The common shift leaves 66.30491 unchanged and only shifts the Cepheid zero point. Raw input observations never change on disk; the adopted vector and interpretation change explicitly inside the comparison.

The diagonalCovarianceCounterfactual sets only off-diagonal observation covariances to zero. It gives 66.82894, with a relative-modulus uncertainty 0.08882 instead of 0.10910. This is a deliberately changed error model, not an alternative use of the same information. The withoutMetallicitySummary fit gives 68.31781 with a wider interval 63.44104–73.56945, showing why the conditioning statement matters.

Finally inspect noAnchor. It reports rank seven, identified=false and null for both Hubble median and interval. Its parameter list fixes the anchor offset to zero solely to display one member of an equally fitting family. Its relative host modulus and uncertainty remain identifiable. Treating those display coordinates as an absolute-distance measurement would reinsert an anchor by hand.

Reading: Riess et al. · PantheonPlusSH0ES DataRelease

Keep a short reproduction record for the next sample

Record the source commit, original row and column indices, units and prepared-value convention. Verify the covariance bytes and every nonzero model coefficient before solving. Check rank before transforming a fitted luminosity into an expansion rate. Save a shared-error test and an omitted-summary sensitivity test alongside the preferred result.

The published article license is CC BY4.0; the source repository has no separate code license. The downloadable fit is our independent implementation of the equations. The selected numerical data carry attribution and source hashes. The original full FITS arrays remain at the pinned author URLs in provenance.json. The optional freeze-shoes-subsystem.py independently extracts the listed rows with NumPy. Run it with --source-cache SOURCE_FOLDER --output-directory extracted --full-reference; add --fetch to retrieve missing pinned files, including the 48MB covariance. The main three-file fit needs only the Python standard library.

Reading: Published article license · PantheonPlusSH0ES DataRelease

Download the exact inputs and results

Put the Python script, selected matrix and independent benchmark in one directory. The source manifest records the original files and checksums. The saved output includes calibration shifts, loss of the anchor and a diagonal-only counterfactual.

Try the observation

Reproduce one calibration comparison interactively

  1. Use Distance ladder and A common shift cancels, then compare its exported adopted settings with the baseline. Confirm the Hubble value is unchanged.
  2. Switch to Expansion shape only when revisiting the earlier forty-source Pantheon+ expansion tutorial. That mode profiles a free brightness zero point and reports an expansion-shape fit.

Exercises and explained answers

Your downloaded fit gives the correct chi-squared but a different Hubble value after a common scale shift. Which check distinguishes this invariance from a numerical bug?

Multiply the design by the stated common-scale null vector after removing the anchor. Every entry must vanish, and changing parameters along that direction must preserve predicted observations. With the anchor present, only changing its adopted value permits that coordinated shift.

Sources and calculation scope

  1. Riess et al., A Comprehensive Measurement of the Local Value of the Hubble Constant, arXiv:2112.04510 v 3 (2022)

    Sections 2.1 and 4 define the joint model and calibrations. Section 5, Table 5 and Figures 14–16 report the full fit and its correlations; sections 6–7 discuss variants and comparisons. All paper-specific claims here refer to this fixed version.

  2. PantheonPlusSH0ES DataRelease, commit c447f0fea703fcd0fff57de5000947b5ca81286b

    The ally, alll and allc FITS arrays contain 3492 prepared observations,47 parameter columns and the full covariance. The public tutorial retains 87 observations and every nonzero model column they use. The table 2.README explicitly warns against refitting from its diagonal errors.

  3. Published article license, DOI10.3847/2041-8213/ac 5 c 5 b

    The published version of record is registered under CC BY4.0. The source repository has no separate code license. These scientific scripts reimplement the fit and attribute the selected numerical data; no author MCMC code is redistributed.

FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy