Commit 66f86404ed25fbb475e7ea244cb5550436a0725c
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 | 38 | """ |
| 39 | 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 | 41 | # Initialise sky map from constructor arguments |
| 48 | 42 | if len(argv) > 0 and isinstance(argv[0], gammalib.GSkyMap): |
| 49 | 43 | self._map = argv[0] |
| ... | ... | @@ -51,6 +45,12 @@ class cssrcdetect(ctools.cscript): |
| 51 | 45 | else: |
| 52 | 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 | 54 | # Initialise other members |
| 55 | 55 | self._map_dirs = [] |
| 56 | 56 | ... | ... |