datasets - Reduced datasets¶
Introduction¶
The gammapy.datasets sub-package contains classes to handle reduced
gamma-ray data for modeling and fitting.
The 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
components.
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: MapDataset,
MapDatasetOnOff, SpectrumDataset,
SpectrumDatasetOnOff and
FluxPointsDataset.
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
cash. The MapDatasetOnOff contains on and off count maps,
background is implicitly modeled via the off counts map, and the wstat fit
statistic.
The spectrum datasets represent 1D spectra (RegionNDMap
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
cash. The SpectrumDatasetOnOff contains on on and off
count spectra, background is implicitly modeled via the off counts spectrum, and
the wstat fit statistic. The FluxPointsDataset contains
estimatorsFluxPoints and a spectral model, the fit statistic used is
chi2.
Getting Started¶
Reference/API¶
gammapy.datasets Package¶
Classes¶
Dataset abstract base class. |
|
|
Dataset collection. |
|
Map dataset for on-off likelihood fitting. |
|
Spectrum dataset for likelihood fitting. |
|
Sample events from a map dataset |
|
Perform sky model likelihood fit on maps. |
|
Spectrum dataset for on-off likelihood fitting. |
|
Fit a set of flux points with a parametric model. |
Variables¶
Registry of dataset classes in Gammapy. |