Skip to main content

CosmoWAP

   ______                         _       _____    ____
  / ____/___  _________ ___  ____| |     / /   |  / __ \
 / /   / __ \/ ___/ __ `__ \/ __ \ | /| / / /| | / /_/ /
/ /___/ /_/ (__  ) / / / / / /_/ / |/ |/ / ___ |/ ____/
\____/\____/____/_/ /_/ /_/\____/|__/|__/_/  |_/_/

PyPI version Licence Docs Codacy Badge ASCL PyPI Downloads Ruff

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

[!NOTE] Note this is still in progress as this is an evolving repo! Occasionally parts will be outdated and will contain deprecated methods.

Installation

[!NOTE] Requires at least Python >=3.10 for full functionality. For use of CosmoPower emulators we recommend using Python 3.10 or 3.11 - See Docs for full details.

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 Cobaya and emulated $P(k)$ with CosmoPower.
  • 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 but LLM have increasingly be used for formatting, bug fixing, tests, optimisation and adding small additional features.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cosmowap-0.8.0.tar.gz (9.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cosmowap-0.8.0-py3-none-any.whl (9.8 MB view details)

Uploaded Python 3

File details

Details for the file cosmowap-0.8.0.tar.gz.

File metadata

  • Download URL: cosmowap-0.8.0.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cosmowap-0.8.0.tar.gz
Algorithm Hash digest
SHA256 eccb88758023753610c0dc0e629adf78f778cf59fb4ae483f817b575ac189a4d
MD5 e14dba064ffaf8dc7909802bf72a4608
BLAKE2b-256 5f2df428cd694d7fc6efe95eaa03d3de0012821808e087d7730dbd8a22ade6d3

See more details on using hashes here.

File details

Details for the file cosmowap-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: cosmowap-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cosmowap-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07e2b41245f71c923063feffa64359da6f33cea433a8a1f46a76997ae24e3716
MD5 5e82c9141b87eeb57ea306361165b7d5
BLAKE2b-256 6050c1defdc88f1b07314273a2465e45dde857b47bd4ba6f983abc761eeb6bdf

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page