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
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 inferenceCustom 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