Correct problem in __str__ with safe_mask
@@ -135,9 +135,12 @@ class MapDataset(Dataset):
exposure_min, exposure_max, exposure_unit = np.nan, np.nan, ""
if self.exposure is not None:
+ if self.mask_safe is not None:
mask = self.mask_safe.reduce_over_axes(np.logical_or).data
if not mask.any():
mask = None
+ else:
+ mask = None
exposure_min = np.min(self.exposure.data[..., mask])
exposure_max = np.max(self.exposure.data[..., mask])
exposure_unit = self.exposure.unit
@@ -1443,6 +1446,8 @@ class MapDatasetOnOff(MapDataset):
cutout_dataset = super().cutout(**cutout_kwargs)
+ del cutout_kwargs["name"]
+
if self.counts_off is not None:
cutout_dataset.counts_off = self.counts_off.cutout(**cutout_kwargs)
