Commit 16092b5c6ffa2342a3ff6f4235581c3cc0fe02ea
1 parent
35f77120
Set chatter level also in ctools that are called from cspull.
Showing
1 changed file
with
11 additions
and
5 deletions
scripts/cspull.py
| @@ -166,8 +166,9 @@ class cspull(ctools.cscript): | @@ -166,8 +166,9 @@ class cspull(ctools.cscript): | ||
| 166 | self.m_profile = self["profile"].boolean() | 166 | self.m_profile = self["profile"].boolean() |
| 167 | 167 | ||
| 168 | # Set some fixed parameters | 168 | # Set some fixed parameters |
| 169 | - self.m_log = False # Logging in client tools | ||
| 170 | - self.m_debug = self["debug"].boolean() # Debugging in client tools | 169 | + self.m_log = False # Logging in client tools |
| 170 | + self.m_chatter = self["chatter"].integer() # Chatter level | ||
| 171 | + self.m_debug = self["debug"].boolean() # Debugging in client tools | ||
| 171 | 172 | ||
| 172 | # Return | 173 | # Return |
| 173 | return | 174 | return |
| @@ -286,7 +287,9 @@ class cspull(ctools.cscript): | @@ -286,7 +287,9 @@ class cspull(ctools.cscript): | ||
| 286 | binsz=self.m_binsz, \ | 287 | binsz=self.m_binsz, \ |
| 287 | npix=self.m_npix, \ | 288 | npix=self.m_npix, \ |
| 288 | edisp=self.m_edisp, \ | 289 | edisp=self.m_edisp, \ |
| 289 | - log=self.m_log, debug=self.m_debug) | 290 | + log=self.m_log, \ |
| 291 | + debug=self.m_debug, \ | ||
| 292 | + chatter=self.m_chatter) | ||
| 290 | 293 | ||
| 291 | # Determine number of events in simulation | 294 | # Determine number of events in simulation |
| 292 | nevents = 0.0 | 295 | nevents = 0.0 |
| @@ -307,10 +310,13 @@ class cspull(ctools.cscript): | @@ -307,10 +310,13 @@ class cspull(ctools.cscript): | ||
| 307 | model_name = models[i].name() | 310 | model_name = models[i].name() |
| 308 | like = obsutils.cterror(obs, model_name, \ | 311 | like = obsutils.cterror(obs, model_name, \ |
| 309 | log=self.m_log, \ | 312 | log=self.m_log, \ |
| 310 | - debug=self.m_debug) | 313 | + debug=self.m_debug, |
| 314 | + chatter=self.m_chatter) | ||
| 311 | else: | 315 | else: |
| 312 | like = obsutils.fit(obs, edisp=self.m_edisp, \ | 316 | like = obsutils.fit(obs, edisp=self.m_edisp, \ |
| 313 | - log=self.m_log, debug=self.m_debug) | 317 | + log=self.m_log, \ |
| 318 | + debug=self.m_debug, \ | ||
| 319 | + chatter=self.m_chatter) | ||
| 314 | 320 | ||
| 315 | # Store results | 321 | # Store results |
| 316 | logL = like.opt().value() | 322 | logL = like.opt().value() |