Demo Notebooks
New to PyBird? Start with the Correlator Tutorial - it showcases the basic usage and key features of PyBird.
All demo notebooks are located in the demo/ directory. You can run them locally or view them on GitHub.
Correlator Tutorial (Start Here!)
The main PyBird tutorial covering:
Basic correlator setup and configuration
Computing power spectra and correlation functions
JAX acceleration and neural network emulator
A quick note on the 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)
View: correlator.ipynb on GitHub | NBViewer
Likelihood Tutorial
Data analysis with PyBird:
Loading BOSS data and configuring likelihoods
Parameter estimation and χ² evaluation
Survey effects and observational systematics
View: likelihood.ipynb on GitHub | NBViewer
Complete Parameter Inference
High-level PyBird workflow:
Parameter inference with the Run class
MCMC sampling and optimization
GetDist integration and posterior analysis
View: run.ipynb on GitHub | NBViewer
BOSS DR12 Analysis
Full inference pipeline with BOSS DR12 LRG data:
Loading and configuring BOSS likelihood
Running MCMC with real data
Posterior analysis and visualization
View: run_boss.ipynb on GitHub | NBViewer
Abacus Simulations
Running PyBird with Abacus mock data:
Configuring Abacus likelihood
ELG, LRG, and QSO tracers
Validation against simulations
View: run_abacus.ipynb on GitHub | NBViewer
JAX Benchmarking
Speed optimization and JAX features:
Performance comparison: Standard vs JAX vs Emulator
Up to 1000x speedup demonstration
Vectorized batch processing
Fake Data Generation
Generate synthetic datasets:
Creating realistic mock catalogs
Survey geometry simulation
Statistical validation
View: fake.ipynb on GitHub | NBViewer
Advanced Inference
Low-level inference control:
Custom sampler configuration
Fisher matrix calculations
Taylor expansion methods
View: inference.ipynb on GitHub | NBViewer
Running Locally
Quick Setup:
# Clone and install
git clone https://github.com/pierrexyz/pybird.git
cd pybird
pip install jupyter matplotlib getdist
# Launch notebooks
jupyter notebook demo/
Learning Path
Start:
correlator.ipynb- Learn PyBird basics and JAX featuresData Analysis:
likelihood.ipynb- Understand data fittingComplete Workflow:
run.ipynb- Master parameter inferenceReal Data:
run_boss.ipynb- BOSS DR12 analysisSimulations:
run_abacus.ipynb- Abacus mock dataCustom Analysis:
inference.ipynb+fake.ipynb- Build custom solutionsPerformance (optional):
jaxbird_benchmarking.ipynb- Test the speed of PyBird on your local machine
Getting Help
Email the developers: Pierre Zhang, Guido D’Amico or Alexander Reeves
Check the installation guide: Installation Guide