Skip to main content

EFT predictions for biased tracers in redshift space.

Project description

PyBird

The Python code for Biased tracers in redshift space

  • EFT predictions for correlators of biased tracers in redshift space
  • Likelihoods of galaxy-clustering data with EFT predictions

General info

Fast correlator computation

  • One-loop EFT predictions for two-point (2pt) functions:
    - dark matter or biased tracers
    - real or redshift space
    - Fourier (power spectrum) or configuration space (correlation function)
  • Additional modeling:
    - geometrical (AP) distortion
    - survey mask
    - binning
    - exact-time dependence
    - wedges / P-statistics
    - and more...
  • JAX acceleration with model-independent neural network emulators

Likelihoods with EFT predictions

Currently available:

BOSS DR12 LRG 2pt full-shape + rec. bao
BOSS-like simulations - PT|ABFG-D|patchy
eBOSS DR16 QSO 2pt full-shape

Soon available:

[BOSS DR12 LRG 3pt full-shape]

Documentation

Read the docs at https://pierrexyz.github.io/pybird.

Installation

PyBird supports multiple installation modes for different use cases:

Repository Installation

For the up-to-date master version, install directly from the GitHub repository:

git clone https://github.com/pierrexyz/pybird.git
cd pybird

Choose your installation mode:

Core PyBird

pip install -e .
  • Includes: NumPy, SciPy, H5PY, emcee, iminuit, pyyaml, fftlog + documentation + development tools

PyBird-JAX

pip install -e ".[jax]"
  • Includes: Everything in Core + JAX ecosystem (jax, jaxlib, flax, optax, numpyro, blackjax, nautilus-sampler)

Backend Control

Regardless of installation mode, you control which backend PyBird uses:

from pybird.config import set_jax_enabled

# Use NumPy backend (works with both installation modes)
set_jax_enabled(False)

# Use JAX backend (works if JAX dependencies are available)
set_jax_enabled(True)

PyPi installation

Pybird is also hosted on PyPi. Installing here is as simple as:

pip install pybird-lss

currently this will get you the core functionalities of pybird without JAX acceleration but we plan to update this in the near future.

Testing Your Installation

After installation, test that everything works:

cd tests
python run_tests.py

Expected output: 🎉 All tests passed!

For detailed installation instructions, troubleshooting, and testing options, see the documentation.

Getting started

Checkout our full list of tuturials here.

The algebra on which PyBird is based is computed in the mathematica notebook cbird.nb.

Attribution

  • Devs:
  • License: MIT
  • Special thanks to: Marco Bonici, Thomas Colas, Yan Lai, Zhiyu Lu, Arnaud de Mattia, Théo Simon, Luis Ureña, Henry Zheng

When using PyBird in a publication, please acknowledge the code by citing the following paper:

G. D’Amico, L. Senatore, and P. Zhang, "Limits on wCDM from the EFTofLSS with the PyBird code", JCAP 01 (2021) 006, 2003.07956

For PyBird-JAX:

A. Reeves, P. Zhang, and H. Zheng, "PyBird-JAX: Accelerated inference in large-scale structure with model-independent emulation of one-loop galaxy power spectra", 2507.20990

The BibTeX entry are:

@article{DAmico:2020kxu,
    author = "D'Amico, Guido and Senatore, Leonardo and Zhang, Pierre",
    title = "{Limits on $w$CDM from the EFTofLSS with the PyBird code}",
    eprint = "2003.07956",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.CO",
    doi = "10.1088/1475-7516/2021/01/006",
    journal = "JCAP",
    volume = "01",
    pages = "006",
    year = "2021"
}

@article{Reeves:2025bxn,
    author = "Reeves, Alexander and Zhang, Pierre and Zheng, Henry",
    title = "{PyBird-JAX: Accelerated inference in large-scale structure with model-independent emulation of one-loop galaxy power spectra}",
    eprint = "2507.20990",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.CO",
    month = "7",
    year = "2025"
}

We would be grateful if you also cite the theory papers when relevant:

The Effective-Field Theory of Large-Scale Structure: 1004.2488, 1206.2926

One-loop power spectrum of biased tracers in redshift space: 1610.09321

Exact-time dependence: 2005.04805, 2111.05739

Wedges / P-statistics: 2110.00016

When using the likelihoods, here are some relevant references:

BOSS DR12 data: 1607.03155, catalogs: 1509.06529, patchy mocks (for covariance estimation): 1509.06400

BOSS DR12 LRG power spectrum measurements: from 2206.08327, using Rustico

BOSS DR12 LRG correlation function measurements: from 2110.07539, using FCFC

BOSS DR12 LRG rec. bao parameters: from 2003.07956, based on post-reconstructed measurements from 1509.06373

BOSS DR12 survey mask measurements: following 1810.05051 with integral constraints and consistent normalization following 1904.08851, from fkpwin, using nbodykit

BOSS EFT likelihood: besides the PyBird paper, see also: 1909.05271, 1909.07951, 2110.07539

PT challenge blind simulations: 2003.08277, with description and submitted results here

eBOSS DR16 data: 2007.08991, catalogs: 2007.09000, EZmocks (for covariance estimation): 1409.1124

eBOSS DR16 QSO power spectrum + survey mask measurements: from 2106.06324

eBOSS EFT likelihood: 2210.14931

*** Disclaimer: due to updates in the data and the prior definition, it is possible that results obtained with up-to-date likelihoods differ slightly with the ones presented in the articles.

Project details


Download files

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

Source Distribution

pybird-lss-0.3.0.tar.gz (307.8 kB view details)

Uploaded Source

Built Distribution

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

pybird_lss-0.3.0-py3-none-any.whl (303.5 kB view details)

Uploaded Python 3

File details

Details for the file pybird-lss-0.3.0.tar.gz.

File metadata

  • Download URL: pybird-lss-0.3.0.tar.gz
  • Upload date:
  • Size: 307.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for pybird-lss-0.3.0.tar.gz
Algorithm Hash digest
SHA256 98ae18b9ee970f4a4abadd99d4c7a9bcd825c928ef3ec98a9bddc78335b69f49
MD5 b962aa41f1d8471dc405460c138a46cc
BLAKE2b-256 dc21b73da49e9f479f346bc9f7c17706bac0131e845c7df41316c8c279d7b53f

See more details on using hashes here.

File details

Details for the file pybird_lss-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pybird_lss-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 303.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for pybird_lss-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2e999dc04b8443dbf5f5b5788e9d2680542105f08e477bbb68d56d2bb110d8
MD5 724826981f97e9e73d1a49e8b971db19
BLAKE2b-256 6a25304cee398f2d195852f72c11421e845aedbf59ac30a754e6fdf7c25da1d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page