SpectrumDatasetMaker¶
-
class
gammapy.spectrum.
SpectrumDatasetMaker
(containment_correction=False, selection=None)[source]¶ Bases:
object
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
- containment_correctionbool
Apply containment correction for point sources and circular on regions.
- selectionlist
List of str, selecting which maps to make. Available: ‘counts’, ‘aeff’, ‘background’, ‘edisp’ By default, all spectra are made.
Attributes Summary
Methods Summary
geom_ref
(region)Reference geometry to project region
make_aeff
(self, region, energy_axis_true, …)Make effective area.
make_background
(region, energy_axis, observation)Make background.
make_counts
(self, region, energy_axis, …)Make counts.
make_edisp
(position, energy_axis, …)Make energy dispersion.
run
(self, dataset, observation)Make spectrum dataset.
Attributes Documentation
-
available_selection
= ['counts', 'background', 'aeff', 'edisp']¶
Methods Documentation
-
make_aeff
(self, region, energy_axis_true, observation)[source]¶ Make effective area.
- Parameters
- Returns
- aeff
EffectiveAreaTable
Effective area table.
- aeff
-
static
make_background
(region, energy_axis, observation)[source]¶ Make background.
- Parameters
- Returns
- background
CountsSpectrum
Background spectrum
- background
-
make_counts
(self, region, energy_axis, observation)[source]¶ Make counts.
- Parameters
- Returns
- counts
CountsSpectrum
Counts spectrum
- counts
-
static
make_edisp
(position, energy_axis, energy_axis_true, observation)[source]¶ Make energy dispersion.
- Parameters
- Returns
- edisp
EnergyDispersion
Energy dispersion
- edisp
-
run
(self, dataset, observation)[source]¶ Make spectrum dataset.
- Parameters
- dataset
SpectrumDataset
Spectrum dataset.
- observation: `~gammapy.data.DataStoreObservation`
Observation to reduce.
- dataset
- Returns
- dataset
SpectrumDataset
Spectrum dataset.
- dataset