Commit 0ed7d0aa3b8f0c1969eb652ab05759ede80f9141
Merge branch 'devel' of https://cta-gitlab.irap.omp.eu/ctools/ctools into 2713-variability-tool
Showing
2 changed files
with
12 additions
and
12 deletions
test/test_csworkflow.py
| @@ -139,10 +139,10 @@ class Test(test): | @@ -139,10 +139,10 @@ class Test(test): | ||
| 139 | models = gammalib.GModels(filename) | 139 | models = gammalib.GModels(filename) |
| 140 | 140 | ||
| 141 | # Set reference values | 141 | # Set reference values |
| 142 | - prefactor = 3.62775976898809e-16 | 142 | + prefactor = 3.63152145731529e-16 |
| 143 | index = 2.39100016863397 | 143 | index = 2.39100016863397 |
| 144 | - pre_background = 1.05367124323594 | ||
| 145 | - index_background = 0.0421705243014668 | 144 | + pre_background = 1.30910556742873 |
| 145 | + index_background = 0.252909973473968 | ||
| 146 | 146 | ||
| 147 | # Check fit result values | 147 | # Check fit result values |
| 148 | self.test_value(models['Crab'][2].value(), | 148 | self.test_value(models['Crab'][2].value(), |
test/test_ctobssim.py
| @@ -86,7 +86,7 @@ class Test(test): | @@ -86,7 +86,7 @@ class Test(test): | ||
| 86 | 86 | ||
| 87 | # Load counts cube and check content. | 87 | # Load counts cube and check content. |
| 88 | evt = gammalib.GCTAEventList('ctobssim_cmd1.fits') | 88 | evt = gammalib.GCTAEventList('ctobssim_cmd1.fits') |
| 89 | - self._test_list(evt, 251) | 89 | + self._test_list(evt, 261) |
| 90 | 90 | ||
| 91 | # Setup ctobssim command | 91 | # Setup ctobssim command |
| 92 | cmd = ctobssim+' inmodel="model_that_does_not_exist.xml"'+ \ | 92 | cmd = ctobssim+' inmodel="model_that_does_not_exist.xml"'+ \ |
| @@ -152,21 +152,21 @@ class Test(test): | @@ -152,21 +152,21 @@ class Test(test): | ||
| 152 | 152 | ||
| 153 | # Check content of observation | 153 | # Check content of observation |
| 154 | self._test_observation(sim) | 154 | self._test_observation(sim) |
| 155 | - self._test_list(sim.obs()[0].events(), 251) | 155 | + self._test_list(sim.obs()[0].events(), 261) |
| 156 | 156 | ||
| 157 | # Save events | 157 | # Save events |
| 158 | sim.save() | 158 | sim.save() |
| 159 | 159 | ||
| 160 | # Load counts cube and check content. | 160 | # Load counts cube and check content. |
| 161 | evt = gammalib.GCTAEventList('ctobssim_py1.fits') | 161 | evt = gammalib.GCTAEventList('ctobssim_py1.fits') |
| 162 | - self._test_list(evt, 251) | 162 | + self._test_list(evt, 261) |
| 163 | 163 | ||
| 164 | # Copy ctobssim tool | 164 | # Copy ctobssim tool |
| 165 | cpy_sim = sim.copy() | 165 | cpy_sim = sim.copy() |
| 166 | 166 | ||
| 167 | # Retrieve observation and check content of copy | 167 | # Retrieve observation and check content of copy |
| 168 | self._test_observation(cpy_sim) | 168 | self._test_observation(cpy_sim) |
| 169 | - self._test_list(cpy_sim.obs()[0].events(), 251) | 169 | + self._test_list(cpy_sim.obs()[0].events(), 261) |
| 170 | 170 | ||
| 171 | # Execute copy of ctobssim tool again, now with a higher chatter | 171 | # Execute copy of ctobssim tool again, now with a higher chatter |
| 172 | # level than before | 172 | # level than before |
| @@ -179,7 +179,7 @@ class Test(test): | @@ -179,7 +179,7 @@ class Test(test): | ||
| 179 | 179 | ||
| 180 | # Load counts cube and check content. | 180 | # Load counts cube and check content. |
| 181 | evt = gammalib.GCTAEventList('ctobssim_py2.fits') | 181 | evt = gammalib.GCTAEventList('ctobssim_py2.fits') |
| 182 | - self._test_list(evt, 251) | 182 | + self._test_list(evt, 261) |
| 183 | 183 | ||
| 184 | # Set-up observation container | 184 | # Set-up observation container |
| 185 | pnts = [{'ra': 83.63, 'dec': 21.01}, | 185 | pnts = [{'ra': 83.63, 'dec': 21.01}, |
| @@ -206,8 +206,8 @@ class Test(test): | @@ -206,8 +206,8 @@ class Test(test): | ||
| 206 | 206 | ||
| 207 | # Retrieve observation and check content | 207 | # Retrieve observation and check content |
| 208 | self._test_observation(sim, nobs=2, pnts=pnts) | 208 | self._test_observation(sim, nobs=2, pnts=pnts) |
| 209 | - self._test_list(sim.obs()[0].events(), 3626) | ||
| 210 | - self._test_list(sim.obs()[1].events(), 3601) | 209 | + self._test_list(sim.obs()[0].events(), 3630) |
| 210 | + self._test_list(sim.obs()[1].events(), 3594) | ||
| 211 | 211 | ||
| 212 | # Save events | 212 | # Save events |
| 213 | sim.save() | 213 | sim.save() |
| @@ -216,8 +216,8 @@ class Test(test): | @@ -216,8 +216,8 @@ class Test(test): | ||
| 216 | obs = gammalib.GObservations('ctobssim_py3.xml') | 216 | obs = gammalib.GObservations('ctobssim_py3.xml') |
| 217 | 217 | ||
| 218 | # Retrieve observation and check content | 218 | # Retrieve observation and check content |
| 219 | - self._test_list(obs[0].events(), 3626) | ||
| 220 | - self._test_list(obs[1].events(), 3601) | 219 | + self._test_list(obs[0].events(), 3630) |
| 220 | + self._test_list(obs[1].events(), 3594) | ||
| 221 | 221 | ||
| 222 | # Return | 222 | # Return |
| 223 | return | 223 | return |