Issue |
A&A
Volume 678, October 2023
|
|
---|---|---|
Article Number | A157 | |
Number of page(s) | 23 | |
Section | Numerical methods and codes | |
DOI | https://doi.org/10.1051/0004-6361/202346488 | |
Published online | 23 October 2023 |
Gammapy: A Python package for gamma-ray astronomy
1
Center for Astrophysics | Harvard and Smithsonian,
USA
e-mail: gammapy-coordination-l@in2p3.fr
2
Université de Paris Cité, CNRS, Astroparticule et Cosmologie,
75013
Paris, France
3
Max-Planck-Institut für Kernphysik,
PO Box 103980,
69029
Heidelberg, Germany
4
IPARCOS Institute and EMFTEL Department, Universidad Complutense de Madrid,
28040
Madrid, Spain
5
Institut de Física d’Altes Energies (IFAE), The Barcelona Institute of Science and Technology,
Campus UAB, Bellaterra,
08193
Barcelona, Spain
6
INAF/IASF Palermo,
Via U. La Malfa, 153,
90146
Palermo PA, Italy
7
Instituto de Astrofísica de Andalucia-CSIC,
Glorieta de la Astronomia s/n,
18008
Granada, Spain
8
Point 8 GmbH
Rheinlanddamm 201,
44139
Dortmund, Germany
9
Astroparticle Physics, Department of Physics, TU Dortmund University,
Otto-Hahn-Str. 4a,
44227
Dortmund, Germany
10
Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM,
91191
Gif-sur-Yvette, France
11
Departament de Física Quàntica i Astrofísica (FQA), Universitat de Barcelona (UB),
c. Martí i Franqués, 1,
08028
Barcelona, Spain
12
Institut de Ciències del Cosmos (ICCUB), Universitat de Barcelona (UB),
c. Martí i Franqués, 1,
08028
Barcelona, Spain
13
Institut d’Estudis Espacials de Catalunya (IEEC),
c. Gran Capità, 2-4,
08034
Barcelona, Spain
14
Departament de Física Quàntica i Astrofísica, Institut de Ciències del Cosmos, Universitat de Barcelona, IEEC-UB,
Martí i Franquès, 1,
08028
Barcelona, Spain
15
Deutsches Elektronen-Synchrotron (DESY),
15738
Zeuthen, Germany
16
Institute of physics, Humboldt-University of Berlin,
12489
Berlin, Germany
17
Université Savoie Mont-Blanc, CNRS, Laboratoire d’Annecy de Physique des Particules - IN2P3,
74000
Annecy, France
18
Max Planck Institute for extraterrestrial Physics,
Giessenbachstrasse,
85748
Garching, Germany
19
Laboratoire Univers et Théories, Observatoire de Paris, Université PSL, Université Paris Cité, CNRS,
92190
Meudon, France
20
Max Planck Computing and Data Facility,
Gießenbachstraße 2,
85748
Garching, Germany
21
School of Physics, University of the Witwatersrand,
1 Jan Smuts Avenue, Braamfontein,
Johannesburg
2050, South Africa
22
The Hong Kong University of Science and Technology, Department of Electronic and Computer Engineering,
PR China
23
Cherenkov Telescope Array Observatory gGmbH (CTAO gGmbH)
Saupfercheckweg 1,
69117
Heidelberg, Germany
24
Erlangen Centre for Astroparticle Physics (ECAP), Friedrich-Alexander-Universität Erlangen-Nürnberg,
Nikolaus-Fiebiger Strasse 2,
91058
Erlangen, Germany
25
IRFU, CEA, Université Paris-Saclay,
91191
Gif-sur-Yvette, France
26
Stocadro GmbH
Arthur-Hoffmann-Straße 95,
04275
Leipzig, Germany
27
Meteo France International,
31100
Toulouse, France
28
Université Bordeaux, CNRS, LP2I Bordeaux, UMR
5797
France
29
Sorbonne Université, Université Paris Diderot, Sorbonne Paris Cité, CNRS/IN2P3, Laboratoire de Physique Nucléaire et de Hautes Energies, LPNHE,
4 Place Jussieu,
75252
Paris, France
30
Academic Computer Centre Cyfronet, AGH University of Science and Technology,
Krakow, Poland
31
Caltech/IPAC,
MC 100-22,
1200 E. California Boulevard,
Pasadena, CA
91125, USA
32
Institut für Astro- und Teilchenphysik, Leopold-Franzens-Universität Innsbruck,
6020
Innsbruck, Austria
Received:
23
March
2023
Accepted:
7
July
2023
Context. Traditionally, TeV-γ-ray astronomy has been conducted by experiments employing proprietary data and analysis software. However, the next generation of γ-ray instruments, such as the Cherenkov Telescope Array Observatory (CTAO), will be operated as open observatories. Alongside the data, they will also make the associated software tools available to a wider community. This necessity prompted the development of open, high-level, astronomical software customized for high-energy astrophysics.
Aims. In this article, we present Gammapy, an open-source Python package for the analysis of astronomical γ-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 γ-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.
Methods. 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 γ-ray instruments. After the data are binned, the flux and morphology of one or more γ-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.
Results. After describing the structure of the package, we show, using publicly available gamma-ray data, the capabilities of Gammapy in multiple traditional and novel γ-ray analysis scenarios, such as spectral and spectro-morphological modeling and estimations of a spectral energy distribution and a light curve. Its flexibility and its 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.
Key words: methods: statistical / astroparticle physics / methods: data analysis / gamma rays: general
© The Authors 2023
Open Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This article is published in open access under the Subscribe to Open model. Subscribe to A&A to support open access publication.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.