English

Gammapy: A Python package for gamma-ray astronomy

Instrumentation and Methods for Astrophysics 2023-10-25 v1 High Energy Astrophysical Phenomena

Abstract

In this article, we present Gammapy, an open-source Python package for the analysis of astronomical γ\gamma-ray data, and illustrate the functionalities of its first long-term-support release, version 1.0. Built on the modern Python scientific ecosystem, Gammapy provides a uniform platform for reducing and modeling data from different γ\gamma-ray instruments for many analysis scenarios. Gammapy complies with several well-established data conventions in high-energy astrophysics, providing serialized data products that are interoperable with other software packages. Starting from event lists and instrument response functions, Gammapy provides functionalities to reduce these data by binning them in energy and sky coordinates. Several techniques for background estimation are implemented in the package to handle the residual hadronic background affecting γ\gamma-ray instruments. After the data are binned, the flux and morphology of one or more γ\gamma-ray sources can be estimated using Poisson maximum likelihood fitting and assuming a variety of spectral, temporal, and spatial models. Estimation of flux points, likelihood profiles, and light curves is also supported. After describing the structure of the package, we show, using publicly available γ\gamma-ray data, the capabilities of Gammapy in multiple traditional and novel γ\gamma-ray analysis scenarios, such as spectral and spectro-morphological modeling and estimations of a spectral energy distribution and a light curve. Its flexibility and power are displayed in a final multi-instrument example, where datasets from different instruments, at different stages of data reduction, are simultaneously fitted with an astrophysical flux model.

Keywords

Cite

@article{arxiv.2308.13584,
  title  = {Gammapy: A Python package for gamma-ray astronomy},
  author = {Axel Donath and Régis Terrier and Quentin Remy and Atreyee Sinha and Cosimo Nigro and Fabio Pintore and Bruno Khélifi and Laura Olivera-Nieto and Jose Enrique Ruiz and Kai Brügge and Maximilian Linhoff and Jose Luis Contreras and Fabio Acero and Arnau Aguasca-Cabot and David Berge and Pooja Bhattacharjee and Johannes Buchner and Catherine Boisson and David Carreto Fidalgo and Andrew Chen and Mathieu de Bony de Lavergne and José Vinícius de Miranda Cardoso and Christoph Deil and Matthias Füßling and Stefan Funk and Luca Giunti and Jim Hinton and Léa Jouvin and Johannes King and Julien Lefaucheur and Marianne Lemoine-Goumard and Jean-Philippe Lenain and Rubén López-Coto and Lars Mohrmann and Daniel Morcuende and Sebastian Panny and Maxime Regeard and Lab Saha and Hubert Siejkowski and Aneta Siemiginowska and Brigitta M. Sipőcz and Tim Unbehaun and Christopher van Eldik and Thomas Vuillaume and Roberta Zanin},
  journal= {arXiv preprint arXiv:2308.13584},
  year   = {2023}
}

Comments

26 pages, 16 figures

R2 v1 2026-06-28T12:04:37.945Z