Skip to main content
FSSC: Fermi Data : Data Analysis : Analysis Threads : Data Selection

Precomputation of Livetime and Exposure

The computation of the likelihood usually occurs many times. Fitting involves varying model parameters until the best values are found (the methodology is described elsewhere). Fits are done with various model parameters fixed or with different sources present or absent. However, certain quantities like livetime and exposure need to be calculated only once. By precomputing these quantities, we can speed up the repeated computation of the likelihood.

Livetime Cube

The LAT instrument response functions are a function of the inclination angle, the angle between the direction to a source and the LAT normal. The number of counts that a source should produce should therefore depend on the amount of time that the source spent at a given inclination angle during an observation. This livetime quantity, the time that the LAT observed a given position on the sky at a given inclination angle, depends only on the history of the LAT's orientation during the observation and not on the source model. The array of these livetimes at all points on the sky is called the 'livetime cube' or 'exposure hypercube,' and is generated by the gtltcube tool. As a practical matter, the livetime cubes are provided on a healpix grid on the sky and in inclination angle bins (see LAT Livetime and Exposure).

Excluding Atmospheric Background Events

In Data Selection, the LAT team recommends maximum zenith angle (ZMAX) selections for specified energy ranges as a method of excluding atmospheric gamma rays from the Earth that can be a significant source of background. Prior to performing a likelihood analysis, you must correct the livetime for the exclusion of these events. There are two options for how to account for this selection in the livetime calculations with slightly different effects.

Using the zmax option in gtltcube

Thi is the currently recommended procedure.

During the livetime cube creation, for each spot on the sky, time periods when that location fails the zmax selection are excluded. This allows you to correct for the exposure effect of the zmax cut that was applied in gtselect, but still be able to use the rest of the ROI (even when events have been removed from some part of the ROI due to the zmax cut). It avoids the problem of the exposure hole at the orbit poles.
  • gtselect zmax = ZMAX
  • gtmktime
    • filter = (DATA_QUAL==1 && LAT_CONFIG==1)
    • ROI-based zenith cut? = no
  • gtltcube zmax = ZMAX (Note: this is a hidden parameter)

Region of Interest (ROI) based zenith selection in gtmktime

More conservative approach, loss in exposure is particularly large at low energies and near the orbit poles.

This method excludes intervals where any part of the excluded zenith region overlaps with any part of the ROI. It offers good performance for pointed mode observations, because it allows use of the data when the Earth is in the FoV, provided that it is not close to the ROI. The disadvantage is that it produces a hole in exposure near the orbit poles (because the Earth limb is always close to these regions, even when out of the LAT FoV). It has the advantage of being very easy to apply. This choice is valid for most analyses, unless you wish to consider the whole sky or the orbit poles. It is the recommended choice for pointed mode (TOO or ARR data).
  • gtselect zmax = ZMAX
  • gtmktime
    • filter = (DATA_QUAL==1 && LAT_CONFIG==1)
    • ROI-based zenith cut? = yes

Exposure Maps

The likelihood consists of two factors: the first is dependent on the detected counts and differs between binned and unbinned likelihood calculations; and the second is equal to the exponential of the negative of the predicted total number of counts Npred for the source model. The exposure map is the total exposure (effective area multiplied by live time) for a given position on the sky producing counts in the Region of Interest. Since the effective area is a function of the photon energy, the exposure map is also a function of this energy. Thus the counts produced by a source at a given position on the sky is the integral of the source flux and the exposure map (a function of energy) at that position. The exposure map is used for extended sources such as the diffuse Galactic and Extragalactic backgrounds and not for individual sources.

The exposure map should be computed over a Source Region that is larger than the Region of Interest by ~50%. This is necessary to ensure that all source photons are included due to the size of the LAT instrument PSF at low energies.