add option to pass none
@@ -925,7 +925,11 @@ class MapDataset(Dataset):
# TODO: add edisp and psf
edisp = None
+
+ if self.psf is not None:
psf = self.psf.to_image()
+ else:
+ psf = None
return self.__class__(
counts=counts,
