data - Data and observations

Introduction currently contains the EventList class, as well as classes for IACT data and observation handling.

Getting Started

You can use the EventList class to load IACT gamma-ray event lists:

>>> from import EventList
>>> filename = '$GAMMAPY_DATA/hess-dl3-dr1/data/hess_dl3_dr1_obs_id_023523.fits.gz'
>>> events =

To load Fermi-LAT event lists, use the EventListLAT class:

>>> from import EventListLAT
>>> filename = "$GAMMAPY_DATA/fermi-3fhl-gc/fermi-3fhl-gc-events.fits.gz"
>>> events =

The other main class in is the DataStore, which makes it easy to load IACT data. E.g. an alternative way to load the events for observation ID 23523 is this:

>>> from import DataStore
>>> data_store = DataStore.from_dir('$GAMMAPY_DATA/hess-dl3-dr1')
>>> events = data_store.obs(23523).events


Gammapy tutorial notebooks that show examples using

Reference/API Package

Data and observation handling.


DataStore([hdu_table, obs_table]) IACT data store.
DataStoreObservation(obs_id, data_store[, …]) IACT data store observation.
EventList(table) Event list for IACT dataset.
EventListBase(table) Event list.
EventListLAT(table) Event list for Fermi-LAT dataset.
FixedPointingInfo(meta) IACT array pointing info.
GTI(table) Good time intervals (GTI) Table.
HDUIndexTable([data, masked, names, dtype, …]) HDU index table.
HDULocation(obs_id, hdu_type, hdu_class, …) HDU localisation, loading and Gammapy object mapper.
ObservationFilter([time_filter, event_filters]) Holds and applies filters to observation data.
ObservationStats([n_on, n_off, a_on, a_off, …]) Observation statistics.
ObservationSummary(obs_stats) Summary of observations.
ObservationTable([data, masked, names, …]) Observation table.
ObservationTableSummary(obs_table[, target_pos]) Observation table summary.
Observations([obs_list]) Container class that holds a list of observations.
PointingInfo(table) IACT array pointing info.