Overview

The following figure presents an overview over the classes of the obs module and their relations.

../../../../_images/uml_obs.png

Overview over the obs module

The central class of the obs module is the abstract base class GObservation which defines the instrument-independent interface for a gamma-ray observation. A gamma-ray observation is defined for a single specific instrument, and describes a time period during which the instrument is in a given stable configuration that can be characterized by a single specific response function. Each gamma-ray observation is composed of events and a response function.

Observations are collected in the container class GObservations which is composed of a list of GObservation elements (the list is of arbitrary length; an empty list is a valid state of the GObservations class). The observation container is furthermore composed of a GModels model container class that holds a list of models used to describe the event distributions of the observations (see Model handling). The GObservations class presents the central element of all scientific data analyses, as it combines all data and all models in a single entity.

Instrument specific implementations of GObservation objects are registered in the registry class GObservationRegistry which statically collects one instance of each instrument-specific observation class that is available in GammaLib (see Registry classes for a general description of registry classes).

The instrument response for a given observation is defined by the abstract base class GResponse. This class is composed of the class GCaldb which implements the calibration data base that is required to compute the response function for a given instrument and observation. GCaldb supports the HEASARC CALDB format (http://heasarc.nasa.gov/docs/heasarc/caldb/), but is sufficiently general to support also other formats (see Using a calibration database to learn how to setup and to use a calibration database). In addition, the class contains members of GResponseCache and GResponseVectorCache which implement value caching that avoids recomputation of response information.

The events for a given observation are defined by the abstract base class GEvents. This class is composed of the classes GGti and GEbounds. GGti implements so called Good Time Intervals, which defines the time period(s) during which the data were taken (see Times in GammaLib). GEbounds implements so called Energy Boundaries, which define the energy intervals that are covered by the data (see Energies in GammaLib).

GEvents is also a container for the individual events, implemented by the abstract GEvent base class. GammaLib distinguishes two types of events: event atoms, which are individual events, and event bins, which are collections of events with similar properties. Event atoms are implemented by the abstract base class GEventAtom, while event bins are implemented by the abstract base class GEventBin. Both classes derive from the abstract GEvent base class.

Each event type has it’s own container class, which derives from the abstract GEvents base class. Event atoms are collected by the abstract GEventList base class, while event bins are collected by the abstract GEventCube base class. The GEventList class contains an instance of the abstract GRoi base class.

The basic constitutents on an event are an energy, implemented by the GEnergy class, a time, implemented by the GTime class and a direction, implemented by the abstract GInstDir base class. The latter is not necessarily a direction on the sky, but can also be a detector number or any other information that encodes spatial information for a given gamma-ray telescope.

The GEnergy class implements energy values in a unit independent way, supporting also conversion of energy values to specific units. The GTime class accomplishes the same for time, allowing also transformations to different time systems. Instances of GTime and GEnergy can be collected using the GTimes and GEnergies container classes. Time are also used to defined so called Good Time Intervals, which are implemented by the GGti class. Good Time Intervals are specified in a given time reference, which is defined by the GTimeReference class.

Instances of GEnergy, GTime and GSkyDir (a direction on the sky) compose the attributes of a photon, implemented by the GPhoton class. Instances of this class can be collected using the GPhotons container class. Alternatively, instead of a sky direction a spatial model can be used to characterise a gamma-ray source, which is implemented using the GSource class.

Support for pulsars is implemented by the GPulsar class which is a collected of ephemerides data, implemented by the GPulsarEphemeris class.

Additional support classes of the module comprise the GPhases class, which defines phase intervals for pulsar or gamma-ray binary analysis, and the GEphemerides class which implements the JPL DE200 ephemerides that can be used for Barycentric corrections.