GammaLib : C++ library for gamma-ray astronomy data analysis

This software was developed (or is under development) within the higher education and research community. Its stability can vary (see fields below) and its working state is not guaranteed.
Higher Edu - Research dev card
  • Creation or important update: 21/02/13
  • Minor correction: 22/02/13
  • Index card author: Jürgen Knödlseder (IRAP)
  • Theme leader: Dirk Hoffmann (Centre de Physique des Particules de Marseille (CPPM-IN2P3))
General software features

GammaLib is a self-contained, instrument independent, open source, multi-platform C++ library, that implements all code required for high-level science analysis of astronomical gamma-ray data. GammaLib is also wrapped into a Python module.

GammaLib does not rely on any third-party software, except of HEASARC's cfitsio library that is used to implement the FITS interface. Large parts of the code treat gamma-ray observations in an abstract representation, and do neither depend on the characteristics of the employed instrument, nor on the particular formats in which data and instrument response functions are delivered. Instrument specific aspects are implemented as isolated and well defined modules that interact with the rest of the library through a common interface. This philosophy also enables the joint analysis of data from different instruments, providing a framework that allows for consistent broad-band spectral fitting or imaging.

GammaLib contains the following modules:

  • a module for observation, data and instrument response function handling
  • a module for the definition of models (astrophysical source and background models)
  • a module for model fitting
  • a module for image handling
  • a module for the creation of ftools
  • a module for numerical computations
  • a module for linear algebra
  • a module with support functions for GammaLib classes
  • an interface for handling of FITS data
  • an interface for handling data in XML format
  • an interface for handling IRAF parameters

GammaLib is highly portable, requiring only a C++ compiler for building. The only dependency needed for operations is the cfitsio library that implement the FITS interface. If available, GammaLib can also benefit from an OpenMP support to perform parallel computations on multi-processor or multi-core machines.

All GammaLib functionalities are accessible via a C++ interface. GammaLib is also available as a Python module (version 2 and 3).

To enable the data analysis for a specific telescope, a dedicated module needs to be implemented that describes the format and the structure of the telescope's data, as well as its instrument response function. By default, GammaLib supports analysis of data from the Fermi/LAT telescope, the COMPTEL telescope, existing Cherenkov telescopes (H.E.S.S., MAGIC, VERITAS), and the future Cherenkov Telescope Array (CTA).

Context in which the software is used

GammaLib is used as basis of the ctools software, a set of executables that is proposed as the science analysis framework for the Cherenkov Telescope Array (CTA) project.

GammaLib is also employed for the analysis of Fermi/LAT data.

Publications related to software

Knödlseder, J. 2011, GammaLib - A new framework for the analysis of Astronomical Gamma-Ray Data, submitted to arXiv (