small correction in make_map_exposure_true_energy
@@ -158,7 +158,7 @@ def make_map_exposure_true_energy(pointing, livetime, aeff, ref_geom, offset_max
# We check if exposure is a 3D array in case there is a single bin in energy
# TODO: call np.atleast_3d ?
if len(exposure.shape) < 3:
- exposure = np.expand_dims(exposure, 0)
+ exposure = np.expand_dims(exposure, 0) * exposure.unit
# Put exposure outside offset max to zero
# This might be more generaly dealt with a mask map
@@ -360,7 +360,7 @@ class MapMaker(object):
self.count_map = WcsNDMap(self.ref_geom)
data = np.zeros_like(self.count_map.data)
- self.exposure_map = WcsNDMap(self.ref_geom, data)
+ self.exposure_map = WcsNDMap(self.ref_geom, data, unit="m2 s")
data = np.zeros_like(self.count_map.data)
self.background_map = WcsNDMap(self.ref_geom, data)
@@ -409,6 +409,10 @@ class MapMaker(object):
)
self._add_cutouts(cutout_slices, count_obs_map, expo_obs_map, background_obs_map)
+ #self.exclusion_map.unit = expo_obs_map.unit
+ #self.background_map.unit = background_obs_map.unit
+ #self.count_map.unit = count_obs_map.unit
+
def _add_cutouts(self, cutout_slices, count_obs_map, expo_obs_map, acceptance_obs_map):
"""Add current cutout to global maps."""
