Skip to main content
QUICK REVIEW

[Paper Review] Redback: A Bayesian inference software package for electromagnetic transients

Nikhil Sarin, M. T. Hübner|arXiv (Cornell University)|Aug 24, 2023
Gamma-ray bursts and supernovaePhysics and Astronomy130 references3 citations
TL;DR

Redback is an open-source, object-oriented Python package for Bayesian inference in electromagnetic transients, enabling end-to-end modeling, simulation, and fitting of kilonovae, supernovae, gamma-ray burst afterglows, and other transients using over 100 models and 12+ samplers. It supports data ingestion from major catalogs, realistic survey simulations (e.g., LSST, ZTF), and joint multi-messenger inference, with modular design for extensibility and integration with Bilby and SNCosmo.

ABSTRACT

Fulfilling the rich promise of rapid advances in time-domain astronomy is only possible through confronting our observations with physical models and extracting the parameters that best describe what we see. Here, we introduce {\sc Redback}; a Bayesian inference software package for electromagnetic transients. {\sc Redback} provides an object-orientated {\sc python} interface to over 12 different samplers and over 100 different models for kilonovae, supernovae, gamma-ray burst afterglows, tidal disruption events, engine-driven transients among other explosive transients. The models range in complexity from simple analytical and semi-analytical models to surrogates built upon numerical simulations accelerated via machine learning. {\sc Redback} also provides a simple interface for downloading and processing data from various catalogs such as extit{Swift} and Fink. The software can also serve as an engine to simulate transients for telescopes such as the Zwicky Transient Facility and Vera Rubin with realistic cadences, limiting magnitudes, and sky-coverage or a hypothetical user-constructed survey or a generic transient for target-of-opportunity observations with different telescopes. As a demonstration of its capabilities, we show how {\sc Redback} can be used to jointly fit the spectrum and photometry of a kilonova, enabling a more powerful, holistic probe into the properties of a transient. We also showcase general examples of how {\sc Redback} can be used as a tool to simulate transients for realistic surveys, fit models to real, simulated, or private data, multi-messenger inference with gravitational waves, and serve as an end-to-end software toolkit for parameter estimation and interpreting the nature of electromagnetic transients.

Motivation & Objective

  • To address the growing need for a flexible, extensible, and robust software toolkit to interpret time-domain photometric data from electromagnetic transients.
  • To overcome limitations in existing software packages, such as restricted model libraries, inflexible interfaces, or lack of integration between simulation and inference.
  • To enable end-to-end Bayesian inference workflows, including model fitting, parameter estimation, and survey optimization, for diverse transient phenomena.
  • To support multi-messenger astronomy by enabling joint inference with gravitational wave events, such as GW170817.
  • To provide a modern, actively maintained, and community-driven open-source platform built on best software development practices for astrophysics applications.

Proposed method

  • Redback implements an object-oriented Python interface that decouples models, likelihoods, priors, and samplers, allowing users to plug in custom components without modifying source code.
  • It integrates with Bilby to expose over 12 open-source Markov Chain Monte Carlo and nested sampling samplers, enabling cross-validation and high-performance inference.
  • The software includes a survey simulation engine that replicates real-world observing conditions (cadence, limiting magnitude, sky coverage) for LSST, ZTF, and user-defined surveys.
  • It provides built-in interfaces to download and process data from public catalogs including Swift, Fink, Lasair, BATSE, and the Open Access Catalogue.
  • Models range from analytical and semi-analytical expressions to machine learning-accelerated surrogates trained on numerical simulations.
  • It leverages standard scientific Python libraries (astropy, SNCosmo, matplotlib, corner) and supports Bayesian hierarchical modeling, model selection, and importance sampling.
Figure 1 : Flowchart showcasing the different modules of Redback and how they interact for different workflows.
Figure 1 : Flowchart showcasing the different modules of Redback and how they interact for different workflows.

Experimental results

Research questions

  • RQ1How can a modular, open-source software package improve the reliability and reproducibility of Bayesian inference in electromagnetic transient astronomy?
  • RQ2To what extent can Redback simulate realistic transient light curves under actual survey observing conditions, enabling accurate survey optimization and selection function estimation?
  • RQ3Can Redback’s flexible interface support joint inference across multiple transient types and multi-messenger events, such as kilonovae and gravitational waves?
  • RQ4How does Redback’s integration with modern software practices (CI/CD, unit testing, active development) enhance long-term maintainability compared to legacy packages?
  • RQ5What is the performance and accuracy of Redback in fitting real and simulated data across diverse transient classes, including tidal disruption events and magnetar-driven supernovae?

Key findings

  • Redback enables end-to-end Bayesian inference for over 100 models of electromagnetic transients, including kilonovae, supernovae, GRB afterglows, and tidal disruption events, with full support for custom model and prior definitions.
  • The package successfully simulates transients under realistic survey conditions for LSST and ZTF, including cadence, depth, and sky coverage, enabling accurate survey design and selection function modeling.
  • Redback has been used in published studies to infer parameters for tidal disruption events (Sarin & Metzger, 2023), SN 2018ibb (Schulze et al., 2023), and joint GRB-kilonova events (Levan et al., 2023), demonstrating its real-world utility.
  • Integration with Bilby allows seamless use of multiple samplers, enabling cross-validation and efficient inference, with support for multiprocessing and advanced sampling techniques.
  • The software’s modular architecture and active development team ensure long-term maintainability and extensibility, with support for new models and data types through community contributions.
  • All results, example scripts, and plotting notebooks are publicly available via GitHub and Zenodo (DOI: 10.5281/zenodo.8273145), and the package is hosted on PyPI with comprehensive documentation at https://redback.readthedocs.io/en/latest/.
Figure 2 : (Left) Simulated kilonova (one component kilonova model) in ZTF and in LSST (Right). We emphasize that aesthetic features such as the colours of the data points, axes limits etc can all be modified by passing in relevant keyword arguments to the plotting methods.
Figure 2 : (Left) Simulated kilonova (one component kilonova model) in ZTF and in LSST (Right). We emphasize that aesthetic features such as the colours of the data points, axes limits etc can all be modified by passing in relevant keyword arguments to the plotting methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.