Skip to main content

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​

ModuleRolePage
src/xi_protocol1b_bao_run.pyData loaders, E(z) for each model, XiOscillator, distances, χ², log_prior, log_probability, run_mcmc, reportingCosmological Models · Likelihood Functions
xi_cosmo.diagnosticsLoad, summarise and check flattened chainsDiagnostics & Plotting
xi_cosmo.plottingMarginal histograms, running mediansDiagnostics & Plotting
xi_cosmo.resultsFinal tables as data classes; AIC/BIC helpersDiagnostics & Plotting
xi_cosmo.labelsParameter names and display names per modelDiagnostics & Plotting
src/xi_protocol1_run.pyEarlier Pantheon-only script (Protocol 1)not documented here
The models are not in xi_cosmo

The 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.


Cross-references​

Related pageRelation
Three Model FamiliesEquations behind the model functions
Likelihood Functions (concept)What the χ² functions compute
OutputsFiles written by these functions