GTI

class gammapy.data.GTI(table)[source]

Bases: object

Good time intervals (GTI) Table.

Data format specification: ref:iact-gti

Note: at the moment dead-time and live-time is in the EVENTS header ... the GTI header just deals with observation times.

Parameters:

table : Table

GTI table

Examples

Load GTIs for a H.E.S.S. event list:

>>> from gammapy.data import GTI
>>> filename = '$GAMMAPY_EXTRA/test_datasets/unbundled/hess/run_0023037_hard_eventlist.fits.gz'
>>> gti = GTI.read(filename)
>>> print(gti)
GTI info:
- Number of GTIs: 1
- Duration: 1568.0 s
- Start: 53292.00592592593 MET
- Start: 2004-10-14T00:08:32.000(TT)
- Stop: 53292.02407407408 MET
- Stop: 2004-10-14T00:34:40.000(TT)

Load GTIs for a Fermi-LAT event list:

>>> filename = '$GAMMAPY_EXTRA/datasets/fermi_2fhl/2fhl_events.fits.gz'
>>> gti = GTI.read(filename)
>>> print(gti)
GTI info:
- Number of GTIs: 36589
- Duration: 171273490.97510204 s
- Start: 54682.659499814814 MET
- Start: 2008-08-04T15:49:40.784(TT)
- Stop: 57053.993550740735 MET
- Stop: 2015-01-31T23:50:42.784(TT)

Attributes Summary

time_delta GTI durations in seconds (Quantity).
time_start GTI start times (Time).
time_stop GTI end times (Time).
time_sum Sum of GTIs in seconds (Quantity).

Methods Summary

read(filename, **kwargs) Read from FITS file.

Attributes Documentation

time_delta

GTI durations in seconds (Quantity).

time_start

GTI start times (Time).

time_stop

GTI end times (Time).

time_sum

Sum of GTIs in seconds (Quantity).

Methods Documentation

classmethod read(filename, **kwargs)[source]

Read from FITS file.

Parameters:

filename : Path, str

Filename