datasets - Reduced datasets¶
gammapy.datasets sub-package contains classes to handle reduced
gamma-ray data for modeling and fitting.
Dataset class bundles reduced data, IRFs and model to perform
likelihood fitting and joint-likelihood fitting.
All datasets contain a
Models container with one or more
SkyModel objects that represent additive emission
To model and fit data in Gammapy, you have to create a
Datasets container object with one or multiple
Dataset objects. Gammapy has built-in support to create and
analyse the following datasets:
The map datasets represent 3D cubes (
WcsNDMap objects) with two
spatial and one energy axis. For 2D images the same map objects and map datasets
are used, an energy axis is present but only has one energy bin. The
MapDataset contains a counzts map, background is modeled with a
BackgroundModel, and the fit statistic used is
MapDatasetOnOff contains on and off count maps,
background is implicitly modeled via the off counts map, and the
The spectrum datasets represent 1D spectra (
objects) with an energy axis. There are no spatial axes or information, the 1D
spectra are obtained for a given on region. The
SpectrumDataset contains a counts spectrum, background is
modeled with a
RegionNDMap, and the fit statistic used is
SpectrumDatasetOnOff contains on on and off
count spectra, background is implicitly modeled via the off counts spectrum, and
wstat fit statistic. The
estimatorsFluxPoints and a spectral model, the fit statistic used is
Note that in Gammapy, 2D image analyses are done with 3D cubes with a single energy bin, e.g. for modeling and fitting, see the 2D map analysis tutorial.
Dataset abstract base class.
Map dataset for on-off likelihood fitting.
Sample events from a map dataset
Perform sky model likelihood fit on maps.
Fit a set of flux points with a parametric model.