PhaseBackgroundMaker¶
-
class
gammapy.spectrum.
PhaseBackgroundMaker
(on_phase, off_phase)[source]¶ Bases:
object
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
Methods Summary
make_counts
(self, dataset, observation)Make off counts.
make_counts_off
(self, dataset, observation)Make off counts.
run
(self, dataset, observation)Run all steps.
Methods Documentation
-
make_counts
(self, dataset, observation)[source]¶ Make off counts.
- Parameters
- dataset
SpectrumDataset
Input dataset.
- observation
DatastoreObservation
Data store observation.
- dataset
- Returns
- counts_off
CountsSpectrum
Off counts.
- counts_off
-
make_counts_off
(self, dataset, observation)[source]¶ Make off counts.
- Parameters
- dataset
SpectrumDataset
Input dataset.
- observation
DatastoreObservation
Data store observation.
- dataset
- Returns
- counts_off
CountsSpectrum
Off counts.
- counts_off
-
run
(self, dataset, observation)[source]¶ Run all steps.
- Parameters
- dataset
SpectrumDataset
Input dataset.
- observation
DataStoreObservation
Data store observation.
- dataset
- Returns
- dataset_on_off
SpectrumDatasetOnOff
On off dataset.
- dataset_on_off