Fix PhaseBackgroundEstimator
@@ -102,8 +102,12 @@ class PhaseBackgroundMaker(Maker):
"""
counts_off = self.make_counts_off(dataset, observation)
counts = self.make_counts(dataset, observation)
- acceptance = np.sum([_[1] - _[0] for _ in self.on_phase])
- acceptance_off = np.sum([_[1] - _[0] for _ in self.off_phase])
+
+ acceptance = RegionNDMap.from_geom(geom=dataset.counts.geom)
+ acceptance.data = np.sum([_[1] - _[0] for _ in self.on_phase])
+
+ acceptance_off = RegionNDMap.from_geom(geom=dataset.counts.geom)
+ acceptance_off.data = np.sum([_[1] - _[0] for _ in self.off_phase])
dataset_on_off = SpectrumDatasetOnOff.from_spectrum_dataset(
dataset=dataset,
