GTI¶
-
class
gammapy.data.
GTI
(table)[source]¶ Bases:
object
Good time intervals (GTI)
Table
.Data format specification: 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 >>> gti = GTI.read('$GAMMAPY_DATA/hess-dl3-dr1//data/hess_dl3_dr1_obs_id_023523.fits.gz') >>> print(gti) GTI info: - Number of GTIs: 1 - Duration: 1687.0 s - Start: 53343.92234009259 MET - Start: 2004-12-04T22:08:10.184(TT) - Stop: 53343.94186555556 MET - Stop: 2004-12-04T22:36:17.184(TT)
Load GTIs for a Fermi-LAT event list:
>>> gti = GTI.read('$GAMMAPY_DATA/fermi_2fhl/2fhl_events.fits.gz') >>> 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.99355074074 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. select_time
(time_interval)Select and crop GTIs in time interval. Attributes Documentation
Methods Documentation
-
classmethod
read
(filename, **kwargs)[source]¶ Read from FITS file.
Parameters: filename :
Path
, strFilename
-
select_time
(time_interval)[source]¶ Select and crop GTIs in time interval.
Parameters: time_interval :
astropy.time.Time
Start and stop time for the selection.
Returns: gti :
GTI
Copy of the GTI table with selection applied.
-
classmethod