SpectrumDatasetMaker#
- class gammapy.makers.SpectrumDatasetMaker[source]#
Bases:
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 of str, optional
Select which maps to make, the available options are: ‘counts’, ‘exposure’, ‘background’, ‘edisp’. By default, all maps 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.
Attributes Summary
Methods Summary
make_counts
(geom, observation)Make counts map.
make_exposure
(geom, observation)Make exposure.
run
(dataset, observation)Make spectrum dataset.
Attributes Documentation
- available_selection = ['counts', 'background', 'exposure', 'edisp']#
- tag = 'SpectrumDatasetMaker'#
Methods Documentation
- static make_counts(geom, observation)[source]#
Make counts map.
If the
RegionGeom
is built from aCircleSkyRegion
, the latter will be directly used to extract the counts. If instead theRegionGeom
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 geometry.
- observation
Observation
Observation container.
- geom
- Returns:
- counts
RegionNDMap
Counts map.
- counts
- make_exposure(geom, observation)[source]#
Make exposure.
- Parameters:
- geom
RegionGeom
Reference map geometry.
- observation
Observation
Observation to compute effective area for.
- geom
- Returns:
- exposure
RegionNDMap
Exposure map.
- exposure
- run(dataset, observation)[source]#
Make spectrum dataset.
- Parameters:
- dataset
SpectrumDataset
Reference dataset.
- observation
Observation
Observation.
- dataset
- Returns:
- dataset
SpectrumDataset
Spectrum dataset.
- dataset
- __init__(selection=None, containment_correction=False, background_oversampling=None, use_region_center=True)[source]#
- classmethod __new__(*args, **kwargs)#