Commit 22e061416647e5c33b3c762bd1b71f1009b7c95b
1 parent
15eaf7d2
Use emin and emax for event selection in csbkgmodel
Showing
2 changed files
with
6 additions
and
4 deletions
cscripts/csbkgmodel.par
| @@ -27,8 +27,8 @@ spatial, s, a, GAUSS,IRF|AEFF|GAUSS,, "Spatial model component" | @@ -27,8 +27,8 @@ spatial, s, a, GAUSS,IRF|AEFF|GAUSS,, "Spatial model component" | ||
| 27 | gradient, b, a, yes,,, "Allow for spatial gradient?" | 27 | gradient, b, a, yes,,, "Allow for spatial gradient?" |
| 28 | spectral, s, a, NODES,PLAW|NODES,, "Spectral model component" | 28 | spectral, s, a, NODES,PLAW|NODES,, "Spectral model component" |
| 29 | ebinalg, s, a, LOG,FILE|LIN|LOG,, "Algorithm for defining energy nodes" | 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 | enumbins, i, a, 10,1,200, "Number of energy nodes" | 32 | enumbins, i, a, 10,1,200, "Number of energy nodes" |
| 33 | ebinfile, f, a, NONE,,, "Name of the file containing the energy node definition" | 33 | ebinfile, f, a, NONE,,, "Name of the file containing the energy node definition" |
| 34 | runwise, b, a, yes,,, "Generate runwise background model?" | 34 | runwise, b, a, yes,,, "Generate runwise background model?" |
cscripts/csbkgmodel.py
| @@ -68,6 +68,8 @@ class csbkgmodel(ctools.csobservation): | @@ -68,6 +68,8 @@ class csbkgmodel(ctools.csobservation): | ||
| 68 | if self['spatial'].string() == 'NODES': | 68 | if self['spatial'].string() == 'NODES': |
| 69 | self._create_energies() | 69 | self._create_energies() |
| 70 | self['runwise'].boolean() | 70 | self['runwise'].boolean() |
| 71 | + self['emin'].real() | ||
| 72 | + self['emax'].real() | ||
| 71 | self['rad'].real() | 73 | self['rad'].real() |
| 72 | 74 | ||
| 73 | # Query ahead output model filename | 75 | # Query ahead output model filename |
| @@ -176,8 +178,8 @@ class csbkgmodel(ctools.csobservation): | @@ -176,8 +178,8 @@ class csbkgmodel(ctools.csobservation): | ||
| 176 | select['rad'] = self['rad'].real() | 178 | select['rad'] = self['rad'].real() |
| 177 | select['tmin'] = 'UNDEF' | 179 | select['tmin'] = 'UNDEF' |
| 178 | select['tmax'] = 'UNDEF' | 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 | select['usethres'] = 'DEFAULT' | 183 | select['usethres'] = 'DEFAULT' |
| 182 | 184 | ||
| 183 | # Select events | 185 | # Select events |