Add quantity parsing for livetime in spectrum datasets
@@ -73,7 +73,7 @@ class SpectrumDataset(Dataset):
raise ValueError("mask data must have dtype bool")
self.counts = counts
- self.livetime = livetime
+ self.livetime = u.Quantity(livetime)
self.mask_fit = mask_fit
self.aeff = aeff
self.edisp = edisp
@@ -417,7 +417,7 @@ class SpectrumDatasetOnOff(SpectrumDataset):
self.counts = counts
self.counts_off = counts_off
- self.livetime = livetime
+ self.livetime = u.Quantity(livetime)
self.mask_fit = mask_fit
self.aeff = aeff
self.edisp = edisp
