data - DL3 data access and observations

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 IACT gamma-ray event lists:

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

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

>>> from gammapy.data import EventListLAT
>>> filename = "$GAMMAPY_DATA/fermi-3fhl-gc/fermi-3fhl-gc-events.fits.gz"
>>> events = EventListLAT.read(filename)

The other main class in gammapy.data 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 gammapy.data import DataStore
>>> data_store = DataStore.from_dir('$GAMMAPY_DATA/hess-dl3-dr1')
>>> events = data_store.obs(23523).events

Using gammapy.data

Gammapy tutorial notebooks that show examples using gammapy.data:

Reference/API

gammapy.data Package

Data and observation handling.

Classes

DataStore([hdu_table, obs_table])

IACT data store.

EventList(table)

Event list.

FixedPointingInfo(meta)

IACT array pointing info.

GTI(table)

Good time intervals (GTI) Table.

HDUIndexTable([data, masked, names, dtype, …])

HDU index table.

Observation([obs_id, obs_info, gti, aeff, …])

In-memory observation.

ObservationFilter([time_filter, event_filters])

Holds and applies filters to observation data.

ObservationTable([data, masked, names, …])

Observation table.

Observations([observations])

Container class that holds a list of observations.

PointingInfo(table)

IACT array pointing info.