Commit b0341d4a601d8c735457608c2ea0f84f9a1f8780
1 parent
1ff3a49f
Add "onsrc" parameter for cspull tests
Showing
1 changed file
with
9 additions
and
3 deletions
test/test_cspull.py
| ... | ... | @@ -33,7 +33,7 @@ class Test(test): |
| 33 | 33 | This test class makes unit tests for the cspull script by using it |
| 34 | 34 | from the command line and from Python. |
| 35 | 35 | """ |
| 36 | - | |
| 36 | + | |
| 37 | 37 | # Constructor |
| 38 | 38 | def __init__(self): |
| 39 | 39 | """ |
| ... | ... | @@ -74,7 +74,7 @@ class Test(test): |
| 74 | 74 | cspull = self._script('cspull') |
| 75 | 75 | |
| 76 | 76 | # Setup cspull command |
| 77 | - cmd = cspull+' inmodel="'+self._model+'"'+ \ | |
| 77 | + cmd = cspull+' inmodel="'+self._model+'" onsrc=""'+ \ | |
| 78 | 78 | ' outfile="cspull_cmd1.dat"'+ \ |
| 79 | 79 | ' ntrials=2'+ \ |
| 80 | 80 | ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ |
| ... | ... | @@ -95,7 +95,7 @@ class Test(test): |
| 95 | 95 | self._check_pull_file('cspull_cmd1.dat') |
| 96 | 96 | |
| 97 | 97 | # Setup cspull command |
| 98 | - cmd = cspull+' inmodel="model_that_does_not_exist.xml"'+ \ | |
| 98 | + cmd = cspull+' inmodel="model_that_does_not_exist.xml" onsrc=""'+ \ | |
| 99 | 99 | ' outfile="cspull_cmd1.dat"'+ \ |
| 100 | 100 | ' ntrials=2'+ \ |
| 101 | 101 | ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ |
| ... | ... | @@ -122,6 +122,7 @@ class Test(test): |
| 122 | 122 | # Set-up unbinned cspull |
| 123 | 123 | pull = cscripts.cspull() |
| 124 | 124 | pull['inmodel'] = self._model |
| 125 | + pull['onsrc'] = '' | |
| 125 | 126 | pull['outfile'] = 'cspull_py1.dat' |
| 126 | 127 | pull['ntrials'] = 2 |
| 127 | 128 | pull['caldb'] = self._caldb |
| ... | ... | @@ -149,6 +150,7 @@ class Test(test): |
| 149 | 150 | # Set-up binned cspull |
| 150 | 151 | pull = cscripts.cspull() |
| 151 | 152 | pull['inmodel'] = self._model |
| 153 | + pull['onsrc'] = '' | |
| 152 | 154 | pull['outfile'] = 'cspull_py2.dat' |
| 153 | 155 | pull['ntrials'] = 1 |
| 154 | 156 | pull['caldb'] = self._caldb |
| ... | ... | @@ -178,6 +180,7 @@ class Test(test): |
| 178 | 180 | # Set-up cspull from event list |
| 179 | 181 | pull = cscripts.cspull() |
| 180 | 182 | pull['inobs'] = self._events |
| 183 | + pull['onsrc'] = '' | |
| 181 | 184 | pull['inmodel'] = self._model |
| 182 | 185 | pull['outfile'] = 'cspull_py3.dat' |
| 183 | 186 | pull['ntrials'] = 1 |
| ... | ... | @@ -201,6 +204,7 @@ class Test(test): |
| 201 | 204 | # Set-up cspull from observation container with unbinned observation |
| 202 | 205 | pull = cscripts.cspull(obs) |
| 203 | 206 | pull['inmodel'] = self._model |
| 207 | + pull['onsrc'] = '' | |
| 204 | 208 | pull['outfile'] = 'cspull_py4.dat' |
| 205 | 209 | pull['ntrials'] = 1 |
| 206 | 210 | pull['caldb'] = self._caldb |
| ... | ... | @@ -220,6 +224,7 @@ class Test(test): |
| 220 | 224 | pull = cscripts.cspull() |
| 221 | 225 | pull['inobs'] = self._inobs |
| 222 | 226 | pull['inmodel'] = self._stacked_model |
| 227 | + pull['onsrc'] = '' | |
| 223 | 228 | pull['outfile'] = 'cspull_py5.dat' |
| 224 | 229 | pull['ntrials'] = 1 |
| 225 | 230 | pull['enumbins'] = 0 |
| ... | ... | @@ -239,6 +244,7 @@ class Test(test): |
| 239 | 244 | pull = cscripts.cspull() |
| 240 | 245 | pull['inobs'] = self._inobs_two |
| 241 | 246 | pull['inmodel'] = self._model |
| 247 | + pull['onsrc'] = '' | |
| 242 | 248 | pull['outfile'] = 'cspull_py6.dat' |
| 243 | 249 | pull['ntrials'] = 1 |
| 244 | 250 | pull['emin'] = 0.02 | ... | ... |