Commit 66f86404ed25fbb475e7ea244cb5550436a0725c

Authored by Luigi Tibaldo
1 parent dad5f0eb

fixed problem when initialising with GSkyMap object

Showing 1 changed file with 6 additions and 6 deletions
cscripts/cssrcdetect.py
@@ -38,12 +38,6 @@ class cssrcdetect(ctools.cscript): @@ -38,12 +38,6 @@ class cssrcdetect(ctools.cscript):
38 """ 38 """
39 Constructor 39 Constructor
40 """ 40 """
41 - # Initialise application by calling the base class constructor  
42 - self._init_cscript(self.__class__.__name__, ctools.__version__, argv)  
43 -  
44 - # Set protected members  
45 - self._models = gammalib.GModels()  
46 -  
47 # Initialise sky map from constructor arguments 41 # Initialise sky map from constructor arguments
48 if len(argv) > 0 and isinstance(argv[0], gammalib.GSkyMap): 42 if len(argv) > 0 and isinstance(argv[0], gammalib.GSkyMap):
49 self._map = argv[0] 43 self._map = argv[0]
@@ -51,6 +45,12 @@ class cssrcdetect(ctools.cscript): @@ -51,6 +45,12 @@ class cssrcdetect(ctools.cscript):
51 else: 45 else:
52 self._map = gammalib.GSkyMap() 46 self._map = gammalib.GSkyMap()
53 47
  48 + # Initialise application by calling the base class constructor
  49 + self._init_cscript(self.__class__.__name__, ctools.__version__, argv)
  50 +
  51 + # Set protected members
  52 + self._models = gammalib.GModels()
  53 +
54 # Initialise other members 54 # Initialise other members
55 self._map_dirs = [] 55 self._map_dirs = []
56 56