Based on T. Montandon, et al., “Angular bispectrum of matter number counts in cosmic structures,” arXiv:2501.05422 (2025).
Description
ang_bispec is a high-performance Python implementation for computing the angular bispectrum of galaxy number counts. It significantly extends the existing Byspectrum code by incorporating finite redshift bins, redshift-space distortions (RSD), and leading general relativistic (GR) projection and radiation effects, all without relying on the Limber approximation.
-
Complete theoretical model
Based on first- and second-order number count expressions from the literature, covering:- Newtonian terms (density, RSD, quadratic terms)
- Non‑integrated projection effects
- Radiative and dynamical GR effects
-
Efficient hypergeometric evaluation
Translated the Mathematica expressions from Assassi et al. (2017) into numba‑accelerated Python for fast computation of the ₂F₁ hypergeometric function. -
Pipeline overview
- Linear cosmology module
- Solves growth functions D(z), f(z), v(z), w(z)
- Interfaces with CLASS to extract potential transfer functions and power spectra
- FFTLog module
- Computes Hankel transforms of the potential power spectrum and transfer function
- Generalized power spectra (C_ℓ(χ))
- Precomputes 7 spectra across ℓ and χ values—this is the main bottleneck
- Precomputation of radial integrals
- Integrals over (r_1) for all (f_{n,m}) coefficients
- Main bispectrum loop
- Computes contributions for all (ℓ₁, ℓ₂, ℓ₃) triplets, including:
- Density, RSD, projection, quadratic, and cross terms
- Computes contributions for all (ℓ₁, ℓ₂, ℓ₃) triplets, including:
- Linear cosmology module
Clone the repo and install dependencies:
git clone https://github.com/TomaMTD/ang_bispec.git
cd ang_bispec