132 self._log_header1(gammalib.TERSE,
'Test source')
133 self._log_string(gammalib.TERSE, str(self.obs().models()[self.
_srcname]))
142 self._log_header1(gammalib.TERSE,
'Compute null hypothesis')
148 self._log_value(gammalib.TERSE,
'Source removed', self.
_srcname)
149 self._log_value(gammalib.TERSE,
'Log-likelihood', repr(logL0))
152 pars = gammalib.GApplicationPars(
'cttsmap.par')
155 nbins = self.
_map.npix()
156 njobs = int(math.ceil(float(nbins) / float(self.
_bins_per_job)) + 0.1)
159 skip_pars = [
'binmin',
'binmax',
'logL0',
'outmap',
'logfile']
162 base_command =
'cttsmap'
165 self._log_header1(gammalib.TERSE,
'Create commands')
166 self._log_value(gammalib.TERSE,
'Number of cttsmap calls', njobs)
172 if par.name()
in skip_pars:
176 if not self[par.name()].was_queried():
181 par.value(self[par.name()].value())
184 base_command +=
' ' + par.name() +
'=' + par.value()
187 base_command +=
' logL0=' + repr(logL0)
197 for job
in range(njobs):
200 outmap = self.
_outmap.url().replace(
'.fits',
'_'+str(job)+
'.fits')
209 sliced_command =
'%s binmin=%s binmax=%s outmap=%s logfile=%s' % \
210 (base_command, str(binmin), str(binmax),
211 outmap, outmap.replace(
'.fits',
'.log'))
214 if self[
'run_in_bkg'].boolean():
215 sliced_command +=
' &'
218 self.
_cmd.append(sliced_command)
221 if self._logExplicit():
223 self._log.header2(
'Commands')
224 for cmd
in self.
_cmd: