Bilby (Bayesian Inference Library) is an open-source Python package designed to perform Bayesian parameter estimation and model selection for gravitational-wave (GW) signals. It offers a flexible, modular, and user-friendly framework that allows researchers to analyze GW data using a variety of signal models, likelihood functions, and sampling algorithms. Bilby is widely used across the gravitational-wave community for both low-latency and high-precision inference, supporting studies ranging from compact binary coalescences to stochastic backgrounds and continuous waves.
Core Features
- Parameter Estimation: Bilby extracts posterior distributions for GW source parameters such as masses, spins, sky location, luminosity distance, inclination, and merger time. It supports various source types including binary black holes (BBH), binary neutron stars (BNS), and neutron star–black hole (NSBH) systems.
- Model Selection: Bilby computes Bayesian evidence, allowing users to compare competing models—for example, different waveform families, population hypotheses, or the presence of an astrophysical signal vs. noise.
- Sampler Flexibility: Bilby supports multiple nested and MCMC samplers (e.g., dynesty, emcee, ptemcee, ultranest), making it adaptable to different problems and computational budgets.
- Waveform Integration: It interfaces with the LALSuite library and other waveform generators, giving users access to a wide range of waveform models including IMRPhenom, SEOBNR, and TaylorF2 families.
Advanced Features
- Hierarchical Inference: Bilby supports hierarchical population analyses, enabling the inference of underlying astrophysical distributions from catalogs of detected events.
- Injection & Recovery: Users can simulate mock GW signals (injections), inject them into real or synthetic data, and attempt recovery to test pipelines or study selection effects.
- Multi-Messenger Support: Bilby can incorporate external data (e.g., electromagnetic counterparts or redshift information) into joint likelihoods, enabling multi-messenger astrophysical inference and standard siren cosmology.
- Custom Likelihoods: Users can define their own likelihood functions and priors, making Bilby applicable to a wide range of Bayesian problems beyond GW astrophysics.
- Visualization Tools: It provides built-in functions for posterior plots, corner plots, prior comparisons, and diagnostics.
Usability & Community
- Open Source: Actively maintained on GitHub, with extensive documentation, tutorials, and Jupyter notebooks.
- Modular API: Users can interact with Bilby at both high and low levels, making it suitable for beginners and advanced users alike.
- Integration: Bilby works well with other tools like B-pop (for population synthesis), GWFish (for forecasting), and GWpy (for data handling).
Bilby is a powerful, community-driven library that enables robust and extensible Bayesian inference for gravitational-wave science. Whether used for real-time event characterization, detailed source property studies, or population-level analyses, Bilby serves as a cornerstone in the data analysis toolkit of gravitational-wave astronomers and multi-messenger researchers.
Link: Bilby Git