Data and observation handling (gammapy.data)

Introduction

gammapy.data 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 gamma-ray event lists:

>>> from gammapy.data import EventListDataset
>>> filename = '$GAMMAPY_EXTRA/datasets/vela_region/events_vela.fits'
>>> events = EventListDataset.read(filename)

TODO: events.info() gives s KeyError: 'ONTIME'. Should we introduce a sub-class EventListIACT?

>>> from gammapy.data import EventListDataset
>>> filename = '$GAMMAPY_EXTRA/datasets/hess-crab4-hd-hap-prod2/run023400-023599/run023523/hess_events_023523.fits.gz'
>>> events = EventListDataset.read(filename)
>>> events.info()

Using gammapy.data

If you’d like to learn more about using gammapy.data, read the following sub-pages:

Reference/API

gammapy.data Package

Data and observation handling.

Classes

DataManager([config]) Data manager.
DataStore([hdu_table, obs_table, name]) IACT data store.
DataStoreObservation(obs_id, data_store) IACT data store observation.
EventList(table) Event list.
EventListDataset(event_list[, gti]) Event list dataset (event list plus some extra info).
EventListDatasetChecker(event_list_dataset) Event list dataset checker.
GTI(table) Good time intervals (GTI) Table.
HDUIndexTable([data, masked, names, dtype, ...]) HDU index table.
HDULocation(obs_id, hdu_type, hdu_class, ...) HDU localisation and loading.
InvalidDataError Invalid data found.
ObservationGroupAxis(name, bins, fmt) Observation group axis.
ObservationGroups(axes) Observation groups.
ObservationList([initlist]) List of DataStoreObservation
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.
PointingInfo(table) IACT array pointing info.
Target(on_region[, position, obs_id, name, tag]) Observation Target.