This package contains all code, data, and results needed to reproduce the analysis in:
"Layer-0 Projection Hypothesis: A Unified Fit to CMB, BAO, SNe Ia, and Local H0"
The Layer-0 projection hypothesis proposes that the Hubble tension arises from a redshift-dependent mapping between locally inferred and asymptotic Hubble constant values:
| Metric | Value | Description |
|---|---|---|
| ΔAIC | -63.1 | Layer-0 decisively favored over ΛCDM |
| ΔBIC | -52.3 | Strong evidence even with BIC penalty |
| χ²_H0 | 69.8 → 13.3 | Dramatic improvement in local H0 fit |
| A | 0.163 ± 0.02 | Projection amplitude |
| α | 4.73 ± 0.5 | Convergence rate |
| H0,∞ | 68.2 km/s/Mpc | Asymptotic Hubble constant |
| H0(z=0) | 79.4 km/s/Mpc | Effective local value |
# Clone or download this package
cd layer0-reproducibility-package
# Install dependencies
pip install -r requirements.txt
# Or use conda
conda env create -f environment.yml
conda activate layer0python code/run_analysis.pyThis requires external datasets. For a full end-to-end run (data download, kernel sensitivity, tests), see Reproduce From Scratch below.
This is the full end-to-end flow to build the environment, fetch data, run analyses, and validate outputs.
# Conda (recommended)
conda env create -f environment.yml
conda activate layer0# Pantheon+ (automatic)
python scripts/download_data.py
# Planck lite likelihood (required for planck_lite mode)
git clone https://github.com/heatherprince/planck-lite-py data/planck_lite
# H0LiCOW posteriors
git clone https://github.com/shsuyu/H0LiCOW-public data/h0licow/H0LiCOW-publicNotes:
- If you already have Planck lite elsewhere, set
planck_lite_repoinconfig/cmb_likelihood.json. - You may remove
data/planck_lite/.gitanddata/h0licow/H0LiCOW-public/.gitafter cloning to reduce size.
# Linux/Mac
bash scripts/run_all.sh
# Windows
scripts\run_all.bat
# Or run individual analyses
python code/run_analysis.py
python code/run_kernel_sensitivity.pypytest tests/ -v -p no:cacheproviderNotes:
- Tests prefer
outputs/(generated byrun_analysis.py/run_kernel_sensitivity.py) and fall back toresults/if outputs are missing. - Run the analysis scripts first if you want tests to validate freshly reproduced outputs.
The compiled PDF is included at paper/layer0_paper.pdf.
To rebuild it locally:
cd paper
# Ensure the projection figure exists
mkdir -p figures
copy ..\\outputs\\figures\\projection_function.png figures\\projection_function.png
# Compile (Windows PowerShell/CMD)
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error layer0_paper.tex
bibtex layer0_paper
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error layer0_paper.tex
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error layer0_paper.texNotes:
paper/aastex631.clsandpaper/aasjournal.bstare bundled for offline builds.
layer0-reproducibility-package/
├── README.md # This file
├── LICENSE # MIT License
├── requirements.txt # Python dependencies
├── environment.yml # Conda environment
│
├── code/
│ ├── layer0_fit.py # Main fitting code
│ ├── sn_likelihood.py # Type Ia SN likelihood
│ ├── cmb_likelihood.py # Planck CMB lite likelihood
│ ├── run_analysis.py # 3-pattern analysis script
│ ├── run_kernel_sensitivity.py
│ ├── prepare_paper_data.py # Generate paper tables/figures
│ └── utils/
│ └── plotting.py # Figure generation
│
├── config/
│ ├── cmb_likelihood.json # CMB likelihood settings
│ └── sn_likelihood.json # SN likelihood settings
│
├── data/
│ ├── README_data.md # Data sources documentation
│ ├── planck_lite/ # Planck lite likelihood (cloned)
│ ├── planck/ # Planck compressed data
│ ├── bao/ # BAO measurements
│ ├── pantheon_plus/ # Pantheon+ SN data
│ ├── h0licow/ # H0LiCOW lens posteriors
│ └── local_h0/
│ └── measurements.json # SH0ES, CCHP, Megamaser
│
├── outputs/ # Analysis outputs (generated)
│ ├── results_summary.json # Main results
│ ├── figures/ # Generated figures
│ └── logs/ # Fit logs
│
├── paper/
│ ├── layer0_paper.tex # Main paper (LaTeX)
│ ├── references.bib # Bibliography
│ ├── tables/ # LaTeX tables
│ └── appendix/ # Appendix sections
│
├── results/ # Pre-computed reference results
│
├── scripts/
│ ├── run_all.sh # Full analysis (Unix)
│ ├── run_all.bat # Full analysis (Windows)
│ └── download_data.py # Data download script
│
└── tests/
├── test_likelihood.py # Likelihood unit tests
└── test_lcdm_baseline.py # ΛCDM reproduction test
- Planck 2018 CMB: Lite likelihood compressed data
- BAO: BOSS DR12 + eBOSS measurements
- Local H0: SH0ES, CCHP, Megamaser measurements
- Pantheon+: 1701 Type Ia supernovae (Scolnic et al. 2022)
- H0LiCOW: 6 lens time-delay posteriors (Wong et al. 2020)
-
ΛCDM Baseline: Standard cosmology with 5 parameters
- Parameters: {H0, Ωm, As, ns, τ}
-
Layer-0 (Inference-Only): With local H0 constraints
- Parameters: {H0,∞, Ωm, A, α, As, ns, τ}
- Projection affects only local H0 interpretation
-
Layer-0 Control: Without local H0 (validation)
- Confirms improvement source is local H0
| Source | H0 (km/s/Mpc) | σ | z_min | z_max | Method |
|---|---|---|---|---|---|
| SH0ES | 73.04 | 1.04 | 0.0233 | 0.150 | Cepheid SNe Ia |
| CCHP | 69.80 | 1.70 | 0.004 | 0.083 | TRGB calibration |
| Megamaser | 73.90 | 3.00 | 0.00227 | 0.034 | Water masers |
from code.run_analysis import main
results = main()
print(results['layer0']['params'])
# {'H0_inf': 68.22, 'Om': 0.3012, 'A': 0.1632, 'alpha': 4.73, ...}delta_aic = results['layer0']['AIC'] - results['lcdm']['AIC']
# -63.1from code.utils.plotting import plot_projection_function
plot_projection_function(A=0.163, alpha=4.73, output='outputs/figures/projection.png')If you use this code or results, please cite:
@article{layer0_2024,
title={Layer-0 Projection Hypothesis: A Unified Fit to CMB, BAO, SNe Ia, and Local $H_0$},
author={Author},
journal={The Astrophysical Journal},
year={2024},
note={in preparation}
}- Code: MIT License
- Paper: CC-BY 4.0
For questions or issues, please open a GitHub issue or contact [author@institution.edu].
We thank the Planck, BOSS/eBOSS, Pantheon+, SH0ES, CCHP, Megamaser Cosmology Project, and H0LiCOW collaborations for making their data publicly available.