add if statement to make_background
@@ -138,6 +138,12 @@ class MapDatasetMaker(Maker):
background : `~gammapy.maps.Map`
Background map.
"""
+ if isinstance(observation.bkg, Map):
+ return interpolate_map_IRF(
+ aeff=observation.bkg,
+ geom=geom,
+ )
+ else:
bkg_coordsys = observation.bkg.meta.get("FOVALIGN", "RADEC")
if bkg_coordsys == "ALTAZ":
