Commit 22e061416647e5c33b3c762bd1b71f1009b7c95b

Authored by Jürgen Knödlseder
1 parent 15eaf7d2

Use emin and emax for event selection in csbkgmodel

cscripts/csbkgmodel.par
... ... @@ -27,8 +27,8 @@ spatial, s, a, GAUSS,IRF|AEFF|GAUSS,, "Spatial model component"
27 27 gradient, b, a, yes,,, "Allow for spatial gradient?"
28 28 spectral, s, a, NODES,PLAW|NODES,, "Spectral model component"
29 29 ebinalg, s, a, LOG,FILE|LIN|LOG,, "Algorithm for defining energy nodes"
30   -emin, r, a, 0.1,,, "First node energy (TeV)"
31   -emax, r, a, 100.0,,, "Last node energy (TeV)"
  30 +emin, r, a, 0.1,,, "Lower energy limit (TeV)"
  31 +emax, r, a, 100.0,,, "Upper energy limit (TeV)"
32 32 enumbins, i, a, 10,1,200, "Number of energy nodes"
33 33 ebinfile, f, a, NONE,,, "Name of the file containing the energy node definition"
34 34 runwise, b, a, yes,,, "Generate runwise background model?"
... ...
cscripts/csbkgmodel.py
... ... @@ -68,6 +68,8 @@ class csbkgmodel(ctools.csobservation):
68 68 if self['spatial'].string() == 'NODES':
69 69 self._create_energies()
70 70 self['runwise'].boolean()
  71 + self['emin'].real()
  72 + self['emax'].real()
71 73 self['rad'].real()
72 74  
73 75 # Query ahead output model filename
... ... @@ -176,8 +178,8 @@ class csbkgmodel(ctools.csobservation):
176 178 select['rad'] = self['rad'].real()
177 179 select['tmin'] = 'UNDEF'
178 180 select['tmax'] = 'UNDEF'
179   - select['emin'] = 'UNDEF'
180   - select['emax'] = 'UNDEF'
  181 + select['emin'] = self['emin'].real()
  182 + select['emax'] = self['emax'].real()
181 183 select['usethres'] = 'DEFAULT'
182 184  
183 185 # Select events
... ...