API Reference
The code has two layers: a self-contained script that implements the models, the likelihood and the sampler, and a small xi_cosmo package of helpers for result tables, chain diagnostics and plots. API pages here are deliberately minimal; the scientific discussion lives on the linked concept pages.
Module map
| Module | Role | Page |
|---|---|---|
src/xi_protocol1b_bao_run.py | Data loaders, E(z) for each model, XiOscillator, distances, χ², log_prior, log_probability, run_mcmc, reporting | Cosmological Models · Likelihood Functions |
xi_cosmo.diagnostics | Load, summarise and check flattened chains | Diagnostics & Plotting |
xi_cosmo.plotting | Marginal histograms, running medians | Diagnostics & Plotting |
xi_cosmo.results | Final tables as data classes; AIC/BIC helpers | Diagnostics & Plotting |
xi_cosmo.labels | Parameter names and display names per model | Diagnostics & Plotting |
src/xi_protocol1_run.py | Earlier Pantheon-only script (Protocol 1) | not documented here |
The models are not in
xi_cosmoThe installable package (pip install -e .) does not contain the cosmological models or the likelihood. Those are functions of the Protocol 1b script, which is meant to be run from the command line. To import them, put src/ on sys.path, as the helper scripts do for xi_cosmo.