PhaseBackgroundMaker#

class gammapy.makers.PhaseBackgroundMaker(on_phase, off_phase)[source]#

Bases: gammapy.makers.core.Maker

Background estimation with on and off phases.

TODO: For a usage example see future notebook.

TODO: The phase interval has to be between 0 and 1. Cases like [-0.1, 0.1], for example, are still not supported.

Parameters
on_phasetuple or list of tuples

on-phase defined by the two edges of each interval (edges are excluded)

off_phasetuple or list of tuples

off-phase defined by the two edges of each interval (edges are excluded)

Attributes Summary

tag

Methods Summary

make_counts(dataset, observation)

Make off counts.

make_counts_off(dataset, observation)

Make off counts.

run(dataset, observation)

Run all steps.

Attributes Documentation

tag = 'PhaseBackgroundMaker'#

Methods Documentation

make_counts(dataset, observation)[source]#

Make off counts.

Parameters
datasetSpectrumDataset

Input dataset.

observationDatastoreObservation

Data store observation.

Returns
counts_offRegionNDMap

Off counts.

make_counts_off(dataset, observation)[source]#

Make off counts.

Parameters
datasetSpectrumDataset

Input dataset.

observationDatastoreObservation

Data store observation.

Returns
counts_offRegionNDMap

Off counts.

run(dataset, observation)[source]#

Run all steps.

Parameters
datasetSpectrumDataset

Input dataset.

observationObservation

Data store observation.

Returns
dataset_on_offSpectrumDatasetOnOff

On off dataset.