Skip to content

BayesEoR is a physically motivated forward-modelling framework for Bayesian recovery of the 21-cm power spectrum from interferometric visibilities. Contributions to the data are modelled jointly and propagated through the instrument response, so the recovered power spectrum and Bayesian evidence reflect their combined uncertainty.

This version is written in JAX and runs on CPU or GPU, with optional distributed GPU linear algebra through JAXMg.

The BayesEoR workflow: cosmological and foreground coefficients are mapped through the instrument into visibilities, followed by marginalisation, nested sampling, power-spectrum recovery and evidence evaluation. The BayesEoR workflow: cosmological and foreground coefficients are mapped through the instrument into visibilities, followed by marginalisation, nested sampling, power-spectrum recovery and evidence evaluation.

How BayesEoR works

In interferometric visibilities, the 21-cm signal is a faint, low signal-to-noise contribution, buried beneath Galactic and extragalactic foregrounds roughly \(10^4\)–\(10^5\) times brighter. The chromatic response of the instrument then maps both into highly degenerate structures, making its extraction a formidable inference problem. Any foreground structure a model fails to describe can be absorbed by the signal and mistaken for a detection, so both must be inferred together within a joint posterior, given by Bayes' theorem:

\[ P(\boldsymbol\theta\mid\boldsymbol d,\mathcal M) = \frac{\mathcal L(\boldsymbol d\mid\boldsymbol\theta,\mathcal M)\, \pi(\boldsymbol\theta\mid\mathcal M)} {\mathcal Z(\boldsymbol d\mid\mathcal M)}. \]

Unlike most other approaches, BayesEoR evaluates the Bayesian evidence, \(\mathcal Z\), alongside the posterior. Comparing evidences between models with and without a 21-cm component quantifies the statistical significance of a detection, and allows the framework to be rigorously validated against spurious detections.

Using these docs

  • Installation and Getting started: set up the package and run a first analysis.
  • Data: the visibilities, instrument and observation inputs.
  • Model: how the 21-cm signal and foregrounds are mapped into visibilities.
  • Inference: marginalisation, sampling, and recovering the power spectrum and evidence.
  • Examples: two worked analyses, with commented configurations.
  • API: the Python reference, generated from the source.