CosmoWAP
______ _ _____ ____
/ ____/___ _________ ___ ____| | / / | / __ \
/ / / __ \/ ___/ __ `__ \/ __ \ | /| / / /| | / /_/ /
/ /___/ /_/ (__ ) / / / / / /_/ / |/ |/ / ___ |/ ____/
\____/\____/____/_/ /_/ /_/\____/|__/|__/_/ |_/_/
Cosmology with Wide-separation, relAtivistic and Primordial non-Gaussian contributions.
CosmoWAP is a project that has grown organically alongside several research works, taking an increasingly central role in their development. It is designed to be a flexible and user-friendly Python framework to enable quick and easy forecasts of large-scale galaxy clustering using 3D power spectrum and/or bispectrum multipoles.
The modelling covers several key areas: relativistic effects, wide-separation corrections, and Primordial non-Gaussianity (PNG) in standard perturbation theory. The core analytical expressions are derived in Mathematica (see MathWAP) and stored as exported .py files for efficiency. These expressions ingest a cosmology (via CLASS) and a flexible set of bias models, and have been thoroughly validated with sanity checks and against existing literature results.
To enable realistic forecasts, the associated machinery has been built around the core: thorough bias modelling with HOD/luminosity functions, theoretical covariances, Fisher matrices, and MCMC modules. These tools are easily accessible and can be used flexibly for a wide range of survey scenarios.
Documentation
Installation
pip install cosmowap
For Development mode...
Clone repository:
git clone https://github.com/craddis1/CosmoWAP.git
and then make editable install:
cd CosmoWAP
pip install -e .
See pyproject.toml's dependencies for full list of dependencies (most are common python libraries). classy (CLASS python wrapper) is necessary to fully use CosmoWAP.
Features
Core Observables
3D redshift space Fourier statistics: Multipoles and full line-of-sight (LOS) dependent expressions (fully multi-tracer compatible).
- $P_{\ell}(k)$: Legendre Power spectrum multipoles.
- $B_{\ell,m}(k_1,k_2,k_3)$: Scoccimarro Bispectrum multipoles (TriPosH extension to come).
Physical Contributions
- Wide-separation (WS) corrections: Wide-angle and radial redshift contributions up to second order in the WS expansion.
- Local Relativistic (GR) effects: Projection and dynamical effects up to $(\mathcal{H}/k)^2$.
- Integrated effects: Lensing, ISW, and time delay contributions (currently implemented for the power spectrum only).
- Primordial non-Gaussianity (PNG): Contributions for local, equilateral, and orthogonal types — uses peak background split approach for biases.
- Non-linearities: Finger-of-God damping and non-linear
HaloFit/HMcode$P(k)$.
Forecasting and Analysis
- Bias modelling: Uses a range literature Luminosity Functions, HOD/HMF and peak-background split approach for different surveys.
- Multi-tracer covariances: Multipole covariances assuming Gaussianity for power spectrum (including wide-separation corrections) and bispectrum.
- Forecasting modules: Fisher matrices and MCMC capabilities through
Cobayaand emulated $P(k)$ withCosmoPower. - Built-in plotting library: Designed for exploring theoretical expressions, covariances and forecasts — plots of parameter posteriors implemented with
ChainConsumer.
Usage
If you use CosmoWAP in your research, please cite the relevant papers:
- Original code: arXiv:2407.00168
- Integrated effects in the power spectrum and forecasting routines: arXiv:2511.09466
- PNG, HODs and forecasting routines : arXiv:26xx.xxxx
LLM Usage
The vast majority is mainly written by myself over the process of several years but LLMs have increasingly be used for formatting, bug fixing, tests, optimisation, adding small additional features, documenation and docstrings.
Contact
If you find any bugs or errors or have any questions and suggestions feel free to get in touch :) - c.l.j.addis@qmul.ac.uk
Metadata
Release files for cosmowap 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cosmowap-0.9.0.tar.gz | 9.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cosmowap-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 MB
Release files / cosmowap-0.9.0.tar.gz
| Download URL | cosmowap-0.9.0.tar.gz |
|---|---|
| Size | 9.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e87430add1365bf3b4a9250753b0580746424c7a4289d615f32f295262178588
|
|
BLAKE2b-256 checksum How to use checksums |
ad82ed5b2b2127724c8ac020fe4c3deaa4673fd27063d19f04b32e36eb816042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / cosmowap-0.9.0-py3-none-any.whl
| Download URL | cosmowap-0.9.0-py3-none-any.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d776ee1422b96aa871a54d8a5d6ce559b0836b03bef92e4c51c0814de077aad
|
|
BLAKE2b-256 checksum How to use checksums |
d0d0206f23137c5d4b1e5d9835bdd2ee05e60e54bcc8a9234ff8f1c3cc16b5f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|