PhaseBackgroundMaker#

class gammapy.makers.PhaseBackgroundMaker(on_phase, off_phase, phase_column_name='PHASE')[source]#

Bases: gammapy.makers.core.Maker

Background estimation with on and off phases.

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).

phase_column_namestr, optional

The name of the column in the event file from which the phase information are extracted. Default is ‘PHASE’.

Attributes Summary

tag

Methods Summary

make_counts(dataset, observation)

Make on counts.

make_counts_off(dataset, observation)

Make off counts.

run(dataset, observation)

Make on off dataset.

Attributes Documentation

tag = 'PhaseBackgroundMaker'#

Methods Documentation

make_counts(dataset, observation)[source]#

Make on counts.

Parameters
datasetSpectrumDataset

Input dataset.

observationDatastoreObservation

Data store observation.

Returns
countsRegionNDMap

On 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]#

Make on off dataset.

Parameters
datasetSpectrumDataset or MapDataset

Input dataset.

observationObservation

Data store observation.

Returns
dataset_on_offSpectrumDatasetOnOff or MapDatasetOnOff

On off dataset.