SpectrumDatasetMaker#
- class gammapy.makers.SpectrumDatasetMaker(selection=None, containment_correction=False, background_oversampling=None, use_region_center=True)[source]#
Bases:
gammapy.makers.map.MapDatasetMaker
Make spectrum for a single IACT observation.
The irfs and background are computed at a single fixed offset, which is recommended 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.
- background_oversamplingint
Background evaluation oversampling factor in energy.
- use_region_centerbool
If True, approximate the IRFs by the value at the center of the region If False, the IRFs are averaged over the entire region
Attributes Summary
Methods Summary
make_background
(geom, observation)Make background map.
make_counts
(geom, observation)Make counts map.
make_edisp
(geom, observation)Make energy dispersion map.
make_edisp_kernel
(geom, observation)Make energy dispersion kernel map.
make_exposure
(geom, observation)Make exposure.
make_exposure_irf
(geom, observation[, ...])Make exposure map with irf geometry.
make_meta_table
(observation)Make info meta table.
make_psf
(geom, observation)Make psf map.
run
(dataset, observation)Make map dataset.
Attributes Documentation
- available_selection = ['counts', 'background', 'exposure', 'edisp']#
- tag = 'SpectrumDatasetMaker'#
Methods Documentation
- make_background(geom, observation)#
Make background map.
- Parameters
- geom
Geom
Reference geom.
- observation
Observation
Observation container.
- geom
- Returns
- background
Map
Background map.
- background
- static make_counts(geom, observation)#
Make counts map.
NOTE for 1D analysis: if the
Geom
is built from aCircleSkyRegion
, the latter will be directly used to extract the counts. If instead theGeom
is built from aPointSkyRegion
, the size of the ON region is taken from theRAD_MAX_2D
table containing energy-dependent theta2 cuts.- Parameters
- geom
Geom
Reference map geom.
- observation
Observation
Observation container.
- geom
- Returns
- counts
Map
Counts map.
- counts
- make_edisp(geom, observation)#
Make energy dispersion map.
- Parameters
- geom
Geom
Reference geom.
- observation
Observation
Observation container.
- geom
- Returns
- edisp
EDispMap
Edisp map.
- edisp
- make_edisp_kernel(geom, observation)#
Make energy dispersion kernel map.
- Parameters
- geom
Geom
Reference geom. Must contain “energy” and “energy_true” axes in that order.
- observation
Observation
Observation container.
- geom
- Returns
- edisp
EDispKernelMap
EdispKernel 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
RegionNDMap
Exposure map.
- exposure
- static make_exposure_irf(geom, observation, use_region_center=True)#
Make exposure map with irf geometry.
- Parameters
- geom
Geom
Reference geom.
- observation
Observation
Observation container.
- geom
- Returns
- exposure
Map
Exposure map.
- exposure
- static make_meta_table(observation)#
Make info meta table.
- Parameters
- observation
Observation
Observation
- observation
- Returns
- meta_table:
Table
- meta_table:
- make_psf(geom, observation)#
Make psf map.
- Parameters
- geom
Geom
Reference geom.
- observation
Observation
Observation container.
- geom
- Returns
- psf
PSFMap
Psf map.
- psf
- run(dataset, observation)#
Make map dataset.
- Parameters
- dataset
MapDataset
Reference dataset.
- observation
Observation
Observation
- dataset
- Returns
- dataset
MapDataset
Map dataset.
- dataset