Commit 4940664e1de65177dd98f3d0fe053e81db4fff6e

Authored by Andreas Specovius
Committed by Luigi Tibaldo
1 parent e801272f

Changed type-test to None-test. Reinitialize exclusion map to GSkyRegionMap object.

Showing 1 changed file with 3 additions and 3 deletions
cscripts/csphagen.py
@@ -834,10 +834,10 @@ class csphagen(ctools.csobservation): @@ -834,10 +834,10 @@ class csphagen(ctools.csobservation):
834 Access exclusion map object 834 Access exclusion map object
835 """ 835 """
836 # Check if exclusion map object was provided 836 # Check if exclusion map object was provided
837 - if type(mapobj) is gammalib.GSkyRegionMap: 837 + if mapobj is not None:
838 838
839 - # Set exclusion map  
840 - self._excl_reg = mapobj 839 + # Set exclusion region map
  840 + self._excl_reg = gammalib.GSkyRegionMap(mapobj)
841 841
842 # Set has exclusion to yes 842 # Set has exclusion to yes
843 self._has_exclusion = True 843 self._has_exclusion = True