diff --git a/cscripts/csphagen.py b/cscripts/csphagen.py index 4e312db..230d9ae 100755 --- a/cscripts/csphagen.py +++ b/cscripts/csphagen.py @@ -834,10 +834,10 @@ class csphagen(ctools.csobservation): Access exclusion map object """ # Check if exclusion map object was provided - if type(mapobj) is gammalib.GSkyRegionMap: + if mapobj is not None: - # Set exclusion map - self._excl_reg = mapobj + # Set exclusion region map + self._excl_reg = gammalib.GSkyRegionMap(mapobj) # Set has exclusion to yes self._has_exclusion = True