SpectrumDatasetMaker

class gammapy.makers.SpectrumDatasetMaker(selection=None, containment_correction=False, background_oversampling=None, use_region_center=True)[source]

Bases: gammapy.makers.MapDatasetMaker

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.

background_oversamplingint

Background evaluation oversampling factor in energy.

use_region_centerbool

Approximate the IRFs by the value at the center of the region

Attributes Summary

available_selection

tag

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
geomGeom

Reference geom.

observationObservation

Observation container.

Returns
backgroundMap

Background map.

static make_counts(geom, observation)

Make counts map.

Parameters
geomGeom

Reference map geom.

observationObservation

Observation container.

Returns
countsMap

Counts map.

make_edisp(geom, observation)

Make energy dispersion map.

Parameters
geomGeom

Reference geom.

observationObservation

Observation container.

Returns
edispEDispMap

Edisp map.

make_edisp_kernel(geom, observation)

Make energy dispersion kernel map.

Parameters
geomGeom

Reference geom. Must contain “energy” and “energy_true” axes in that order.

observationObservation

Observation container.

Returns
edispEDispKernelMap

EdispKernel map.

make_exposure(geom, observation)[source]

Make exposure.

Parameters
geomRegionGeom

Reference map geom.

observation: `~gammapy.data.Observation`

Observation to compute effective area for.

Returns
exposureRegionNDMap

Exposure map.

static make_exposure_irf(geom, observation, use_region_center=True)

Make exposure map with irf geometry.

Parameters
geomGeom

Reference geom.

observationObservation

Observation container.

Returns
exposureMap

Exposure map.

static make_meta_table(observation)

Make info meta table.

Parameters
observationObservation

Observation

Returns
meta_table: Table
make_psf(geom, observation)

Make psf map.

Parameters
geomGeom

Reference geom.

observationObservation

Observation container.

Returns
psfPSFMap

Psf map.

run(dataset, observation)

Make map dataset.

Parameters
datasetMapDataset

Reference dataset.

observationObservation

Observation

Returns
datasetMapDataset

Map dataset.