SpectrumDatasetMaker¶
-
class
gammapy.makers.
SpectrumDatasetMaker
(selection=None, containment_correction=False)[source]¶ Bases:
gammapy.makers.Maker
Make spectrum for a single IACT observation.
The irfs and background are computed at a single fixed offset, which is recommend only for point-sources.
- Parameters
- selectionlist
List of str, selecting which maps to make. Available: ‘counts’, ‘exposure’, ‘background’, ‘edisp’ By default, all spectra are made.
- containment_correctionbool
Apply containment correction for point sources and circular on regions.
Attributes Summary
Methods Summary
make_background
(geom, observation)Make background.
make_counts
(geom, observation)Make counts map.
make_edisp_kernel
(geom, observation)Make energy dispersion.
make_exposure
(geom, observation)Make exposure.
make_meta_table
(observation)Make info meta table.
run
(dataset, observation)Make spectrum dataset.
Attributes Documentation
-
available_selection
= ['counts', 'background', 'exposure', 'edisp']¶
-
tag
= 'SpectrumDatasetMaker'¶
Methods Documentation
-
static
make_background
(geom, observation)[source]¶ Make background.
- Parameters
- geom
RegionGeom
Reference map geom.
- observation: `~gammapy.data.Observation`
Observation to compute effective area for.
- geom
- Returns
- background
RegionNDMap
Background spectrum
- background
-
static
make_counts
(geom, observation)[source]¶ Make counts map.
- Parameters
- geom
RegionGeom
Reference map geom.
- observation
Observation
Observation container.
- geom
- Returns
- counts
RegionNDMap
Counts map.
- counts
-
make_edisp_kernel
(geom, observation)[source]¶ Make energy dispersion.
- Parameters
- geom
Geom
Reference geom. Must contain “energy” and “energy_true” axes in that order.
- observation: `~gammapy.data.Observation`
Observation to compute edisp for.
- geom
- Returns
- edisp
EDispKernelMap
Energy dispersion kernel map
- edisp
-
make_exposure
(geom, observation)[source]¶ Make exposure.
- Parameters
- geom
RegionGeom
Reference map geom.
- observation: `~gammapy.data.Observation`
Observation to compute effective area for.
- geom
- Returns
- exposure
EffectiveAreaTable
Exposure map.
- exposure
-
static
make_meta_table
(observation)[source]¶ Make info meta table.
- Parameters
- observation
Observation
Observation
- observation
- Returns
- meta_table:
Table
- meta_table:
-
run
(dataset, observation)[source]¶ Make spectrum dataset.
- Parameters
- dataset
SpectrumDataset
Spectrum dataset.
- observation: `~gammapy.data.Observation`
Observation to reduce.
- dataset
- Returns
- dataset
SpectrumDataset
Spectrum dataset.
- dataset