Commit 3a96805c668226afac2cf67bccaa89974d36109b
1 parent
65802b0d
Adapt code to actual interface
Showing
1 changed file
with
7 additions
and
7 deletions
scripts/cssens.py
| ... | ... | @@ -64,9 +64,9 @@ class cssens(ctools.cscript): |
| 64 | 64 | |
| 65 | 65 | # Initialise application |
| 66 | 66 | if len(argv) == 0: |
| 67 | - ctool.cscript.__init__(self, self.name, self.version) | |
| 67 | + ctools.cscript.__init__(self, self.name, self.version) | |
| 68 | 68 | elif len(argv) ==1: |
| 69 | - ctool.cscript.__init__(self, self.name, self.version, *argv) | |
| 69 | + ctools.cscript.__init__(self, self.name, self.version, *argv) | |
| 70 | 70 | else: |
| 71 | 71 | raise TypeError("Invalid number of arguments given.") |
| 72 | 72 | |
| ... | ... | @@ -154,8 +154,8 @@ class cssens(ctools.cscript): |
| 154 | 154 | self.m_num_avg = self["num_avg"].integer() |
| 155 | 155 | |
| 156 | 156 | # Set some fixed parameters |
| 157 | - self.m_log = False # Logging in client tools | |
| 158 | - self.m_debug = False # self["debug"].boolean() # Debugging in client tools | |
| 157 | + self.m_log = False # Logging in client tools | |
| 158 | + self.m_debug = self["debug"].boolean() # Debugging in client tools | |
| 159 | 159 | |
| 160 | 160 | # Return |
| 161 | 161 | return |
| ... | ... | @@ -271,9 +271,9 @@ class cssens(ctools.cscript): |
| 271 | 271 | pntdir.lb_deg(lpnt, bpnt) |
| 272 | 272 | |
| 273 | 273 | # Create CTA observation |
| 274 | - run = obsutils.set(pntdir, caldb=self.m_caldb, irf=self.m_irf, \ | |
| 275 | - duration=self.m_duration, \ | |
| 276 | - emin=emin, emax=emax, rad=self.m_roi) | |
| 274 | + run = obsutils.set_obs(pntdir, caldb=self.m_caldb, irf=self.m_irf, \ | |
| 275 | + duration=self.m_duration, \ | |
| 276 | + emin=emin, emax=emax, rad=self.m_roi) | |
| 277 | 277 | |
| 278 | 278 | # Append observation to container |
| 279 | 279 | obs.append(run) | ... | ... |