Source-linked AI summary

Bilby: A user-friendly Bayesian inference library for gravitational-wave astronomy

Gregory Ashton, Moritz Huebner, Paul D. Lasky, Colm Talbot, Kendall Ackley, Sylvia Biscoveanu, Qi Chu, Atul Divarkala, Paul J. Easter, Boris Goncharov, Francisco Hernandez Vivanco, Jan Harms, Marcus E. Lower, Grant D. Meadors, Denyz Melchor, Ethan Payne, Matthew D. Pitkin, Jade Powell, Nikhil Sarin, Rory J. E. Smith, Eric Thrane

arXiv:1811.02042v1astro-ph.IMastro-ph.HEgr-qc

TL;DR

Gravitational-wave astronomy needs accessible, robust Bayesian inference software for analyzing public and simulated data across diverse signal models. The paper introduces Bilby, a modular Python library with expert-level infrastructure and straightforward syntax, and demonstrates its use for source, signal-model, detector, and population inference. The examples show that Bilby can reproduce GW150914 analyses, support alternative models and likelihoods, and perform hierarchical population studies.

  • Problem

    The growth of gravitational-wave astronomy and public data creates a need for robust, user-friendly Bayesian inference software usable by both novices and experts.

  • Method

    Bilby provides modular Python infrastructure for Bayesian parameter estimation on real and simulated data, with extensible waveform models, likelihoods, detectors, and population-analysis tools.

  • Results

    Bilby reproduces GW150914 analyses, supports binary black hole and neutron star studies, accommodates arbitrary signal models and likelihoods, and performs hierarchical population inference.

  • Takeaways & Limitations

    Bilby provides a common, adaptable framework for gravitational-wave inference spanning public data, simulations, nonstandard signals, new detectors, and population studies.

Abstract

from arXiv · show

Bayesian parameter estimation is fast becoming the language of gravitational-wave astronomy. It is the method by which gravitational-wave data is used to infer the sources' astrophysical properties. We introduce a user-friendly Bayesian inference library for gravitational-wave astronomy, Bilby. This python code provides expert-level parameter estimation infrastructure with straightforward syntax and tools that facilitate use by beginners. It allows users to perform accurate and reliable gravitational-wave parameter estimation on both real, freely-available data from LIGO/Virgo, and simulated data. We provide a suite of examples for the analysis of compact binary mergers and other types of signal model including supernovae and the remnants of binary neutron star mergers. These examples illustrate how to change the signal model, how to implement new likelihood functions, and how to add new detectors. Bilby has additional functionality to do population studies using hierarchical Bayesian modelling. We provide an example in which we infer the shape of the black hole mass distribution from an ensemble of observations of binary black hole mergers.

I. INTRODUCTION

Bilby addresses the need for robust, user-friendly gravitational-wave inference software as public data and Bayesian parameter estimation become central to the field. Its modular, example-driven design supports novices and experts across compact binaries, other signal models, and population studies.

  • Bayesian parameter estimation estimates gravitational-wave source properties and supports studies of nuclear-density matter and tests of general relativity.
  • The open-data era creates a need for robust, user-friendly inference software usable by gravitational-wave novices and experts.
  • Bilby provides expert-level parameter-estimation infrastructure with straightforward syntax, enabling users to analyze publicly available LIGO/Virgo data with minimal effort.
  • Design philosophy: Modularity lets users define waveform models and likelihood functions, apply Bilby beyond compact binary coalescences, and extend it to future applications.
  • Examples: The paper uses examples covering compact binary coalescences, supernovae, post-merger remnants, and hierarchical population inference.
  • Design philosophy: Bilby’s design goals are expert power, novice accessibility, and straightforward incorporation of advances without massive rewrites.

III. CODE OVERVIEW

Bilby separates general inference functionality from domain-specific packages and presents a common interface for priors, likelihoods, samplers, and results. This architecture supports custom models, sampler changes, reusable outputs, and future extensions.

  • Bilby is open-source, MIT licensed, written in Python, and distributed with documentation and scripts for reproducing the paper’s examples.
  • Bilby separates logical code blocks into core, gw, and hyper packages to support reuse and abstraction.
  • Core package: The core package passes user-defined priors and likelihoods to samplers and returns a common result object with posterior samples and evidence.
  • Core package: Users can define custom prior and likelihood classes while Bilby handles the remaining housekeeping logic.
  • Sampling: The run_sampler interface allows users to switch among prewrapped samplers and set runtime requirements such as live points or walkers.
  • Results: Sampler-independent output is stored in an hdf5 file containing posterior samples, likelihood calculations, injected parameters, and evidence calculations.

2. The gw package

The gw package builds gravitational-wave-specific inference on Bilby’s general core, providing transient-wave priors, likelihoods, waveform approximants, and detector-data tools. The hyper package extends the library to hierarchical population inference.

  • The gw package: The gw package provides gravitational-wave-specific priors, the standard transient likelihood, and waveform approximants handled through LALSimulation.
  • The gw package: Its detector tools load, clean, and analyze gravitational-wave data through Interferometer objects, including user-defined detectors.
  • The hyper package: The hyper package provides hierarchical Bayesian inference for populations through its Model module and HyperparameterLikelihood class.
  • Examples: The section presents Bilby examples analyzing binary black hole and binary neutron star signals.
  • Likelihood: The standard Gaussian noise likelihood evaluates strain data d given source parameters θ, with σ representing noise amplitude spectral density and µ(θ) the waveform.
  • Likelihood: The waveform parameters include intrinsic masses and spins plus extrinsic distance, orientation, timing, phase, and sky-location parameters.

A. GW150914: the onset of gravitational wave astronomy

Bilby reproduces GW150914 parameter-estimation results from publicly available LIGO data using a compact workflow built around detector data, priors, likelihoods, and samplers. The example also shows how sampling accuracy and calibration treatment can be adjusted.

  • GW150914 was detected by the Hanford and Livingston LIGO detectors, and Bilby uses publicly available event data to reproduce its parameter-estimation results.
  • Data preparation: Bilby’s event-data function downloads and windows the relevant detector data, saves a local copy, and produces diagnostic strain spectral-density plots.
  • Inference setup: The analysis combines default priors with a Gaussian noise likelihood before calling a sampler.
  • Inference setup: The GW150914-specific prior narrows primary masses to 30–50 M⊙, secondary masses to 20–40 M⊙, and coalescence time to ±0.1 seconds around the known time.
  • Sampling: Dynesty returns posterior samples, Bayesian evidence, and metadata, while increasing live points and using CPNest can improve treatment of difficult extrinsic-parameter degeneracies.
  • Results: Bilby posterior distributions are compared with LALInference posteriors for black-hole masses, luminosity distance, inclination, and sky localization.
  • Caveat: The example omits detector calibration uncertainty, although Bilby includes cubic-spline functionality for modeling it.

B. Binary black hole merger injection

Bilby injects and recovers simulated binary black hole signals in a three-detector network, while allowing users to restrict or extend the sampled parameters. The recovered posteriors agree well with injected values, including the usual distance–inclination degeneracy.

  • Bilby supports injecting simulated gravitational-wave signals into Monte Carlo data and recovering their astrophysical properties.
  • The example injects a binary black hole signal into LIGO-Livingston, LIGO-Hanford, and Virgo data, sampling only four parameters for faster laptop-scale analysis.
  • Users can limit or extend the number of parameters included in the likelihood calculation.
  • 6000 live points and approximately 30 minutes were required to sample the four-dimensional parameter space with PyMultiNest on a laptop.
  • The recovered parameters agree well with the injected values, with the usual luminosity-distance–inclination degeneracy between dL and ι.

C. Measuring tidal effects in binary neutron star coalescences

Bilby applies binary neutron star inference to tidal deformability, a key quantity for constraining dense nuclear matter. A simulated three-detector injection recovers the correlated tidal parameters using a reparameterized sampling basis.

  • Binary neutron star tidal parameters help determine the equation of state of matter at supranuclear densities.
  • Bilby injects a TaylorF2 binary neutron star signal into a three-detector LIGO–Virgo network at design sensitivity.
  • The injection uses m1 = 1.3 M⊙, m2 = 1.5 M⊙, dL = 50 Mpc, a1,2 = 0.02, and Λ1,2 = 400.
  • Because Λ1 and Λ2 are highly correlated, the analysis samples in ˜Λ and δ˜Λ instead.
  • The two-dimensional marginalized posterior on ˜Λ and δ˜Λ is compared with the injected values.

D. Implementing New Waveforms

Bilby is designed to accommodate complex and user-defined waveform models across time- and frequency-domain analyses. Its examples include higher-order modes, eccentricity, memory, and non-standard polarizations.

  • Bilby makes it straightforward to implement complex signal models including higher-order modes, eccentricity, gravitational-wave memory, and non-standard polarizations.
  • Existing signal models in the LAL software can be called by defining which parameters to include in the sampler.
  • Users can define and sample models in either the time or frequency domain.
  • Different waveform models can be used for signal injection and recovery by instantiating two WaveformGenerators.

E. Adding detectors to the network

Bilby supports modular detector-network construction, including user-defined interferometers with specified geometry, location, and noise response. Adding a third detector can substantially reduce sky-localization uncertainty.

  • Bilby includes current and proposed detectors, while allowing users to define additional interferometers through their physical and noise characteristics.Detector descriptions include geographic coordinates, orientation, and noise power spectral density; the interface supports geometry, location, and frequency response.
  • A new detector can be incorporated into signal injection, noise realization, and parameter-estimation analyses alongside existing instruments.The likelihood evaluation loops over the supplied detectors and multiplies their individual likelihoods into a combined likelihood.
  • Approximately a factor four reduction in sky-localization uncertainty occurs when the Australian detector is added to the Hanford–Livingston network.The comparison uses an injected GW150914-like binary black hole inspiral at dL=4 Gpc and contrasts two- versus three-detector networks.

V. ALTERNATIVE SIGNAL MODELS

Bilby’s gravitational-wave package supports signal models beyond compact binary coalescences, including numerical-relativity supernovae and alternative waveform representations. These examples show that users can define new source models and recover their signals.

  • Alternative signal models: Bilby supports parameter estimation for any signal type whose signal model can be defined, not only compact binary coalescences.The examples include a core-collapse supernova signal and a simplified post-merger neutron-star model.
  • Supernovae: A numerical-relativity supernova waveform can be injected by defining a signal class that reads a gravitational-wave strain time series from an ASCII file.The example uses signal L15 from a three-dimensional simulation of a non-rotating core-collapse supernova with a 15 M⊙ progenitor.
  • Supernovae: Principal component analysis represents the supernova strain as a weighted sum of orthonormal basis vectors whose coefficients, distance proxy, and sky location become inference parameters.Bilby implements this representation as a new signal model with k = 5 and uniform priors between -1 and 1 for each βj.
  • Supernovae: The recovered posterior waveforms reconstruct the injected supernova signal, with a maximum-likelihood curve and posterior-sample band shown in Figure 7.The figure compares the injected and recovered signals in the frequency domain.

B. Neutron star post-merger remnant

Post-merger inference is difficult because reliable waveforms are scarce and phase evolution is hard to model, motivating amplitude-only likelihoods. Bilby demonstrates this approach on a toy remnant signal and extends it to hierarchical population inference.

  • Neutron star post-merger remnant: Parameter inference for short-lived neutron-star post-merger signals remains immature because reliable waveforms are scarce and expensive numerical-relativity simulations are difficult.The simulations must capture rapid phase evolution and complex post-merger physics.
  • Neutron star post-merger remnant: Because frequency content carries equation-of-state information while phase evolution is difficult to model, inference may use amplitude spectral content alone.This requires a likelihood function different from the standard one used earlier in the paper.
  • Alternative likelihood: Bilby implements a power-spectral-density burst likelihood through a new Likelihood class that returns a single likelihood evaluation from frequency, noise, and waveform inputs.The new likelihood is passed to the standard run_sampler() workflow.
  • Alternative likelihood: Posterior waveform samples cover the injected double-peaked Gaussian signal when the amplitude-only likelihood is applied with uniform priors on peak amplitudes, widths, and frequencies.The injection uses a constant noise spectral density.
  • Population inference: Bilby also supports hierarchical Bayesian inference by reweighting event posterior samples according to population-model and sampling-prior ratios.The resulting hyperparameter likelihood uses the event evidences and posterior-sample counts, with user-defined population and sampling priors.
  • Population inference: The population example recovers hyperparameters describing a postulated excess of black holes from pulsational pair-instability supernovae.The example estimates the abundance and characteristic mass of black holes formed through this mechanism while holding seven additional hyperparameters fixed.

VII. ANALYSIS OF ARBITRARY DATA: AN EXAMPLE

Bilby can analyze arbitrary data through its generic inference functionality, not only gravitational-wave signals. A logo example demonstrates posterior sampling after mapping an image letter into x-y coordinates.

  • Bilby functions as a generic inference package applicable beyond gravitational-wave astronomy, including timedomain radioactive-decay data and radio or x-ray neutron-star observations.The paper also mentions multimessenger signals associated with binary neutron-star mergers.
  • The logo example imports an image, maps the letter to an x-y coordinate system, and samples both dimensions using a likelihood with uniform priors.The posterior distribution for the letter “B” is shown in Figure 10, with all letters shown in Figure 11.
  • Bilby provides repository code for generating the logo posterior distributions, including the example implemented in sample_logo.py.The figures show the “B” and all letters from the Bilby logo.

VIII. CONCLUSION

Bilby is presented as open-source, modular inference software for gravitational-wave astronomy, applicable to LIGO/Virgo and simulated data, population studies, and arbitrary signal models. Its unified sampler interface broadens usability but leaves performance dependent on sampler choice.

  • Bilby supports Bayesian inference on LIGO/Virgo open data, simulated data, and hierarchical population studies.
  • Only five lines of code are required to reconstruct GW150914’s astrophysical parameters, with modest changes enabling alternative priors, waveform models, and sampling methods.
  • Bilby demonstrates how to inject binary black hole and binary neutron star signals into Monte Carlo noise and define new gravitational-wave detectors.
  • Bilby provides a unified interface to multiple samplers, but its inference quality depends on the implemented sampler and systematic sampler comparisons remain underway.
  • Bilby supports arbitrary signal models through user-defined models, including numerical-relativity supernovae, and likelihood functions beyond the standard transient likelihood.
Loading 1811.02042v1…