Commit 27e49f06a8842f5adef7b478f5fac6317b1bc017

Authored by Jürgen Knödlseder
1 parent 6b40d0a5

Adjust unit tests

test/test_csworkflow.py
... ... @@ -140,16 +140,16 @@ class Test(test):
140 140  
141 141 # Check fit result values
142 142 self.test_value(models['Crab'][2].value(),
143   - 5.65431687851392e-16, 1.0e-4 * 5.65431687851392e-16,
  143 + 5.65974581468379e-16, 1.0e-4 * 5.65974581468379e-16,
144 144 'Check Crab prefactor')
145 145 self.test_value(models['Crab'][3].value(),
146   - -2.45753747320273, 1.0e-4 * 2.45753747320273,
  146 + -2.45911900829089, 1.0e-4 * 2.45911900829089,
147 147 'Check Crab index')
148 148 self.test_value(models['Background'][0].value(),
149   - 1.0444753409474, 1.0e-4 * 1.0444753409474,
  149 + 1.04744971751241, 1.0e-4 * 1.04744971751241,
150 150 'Check background model prefactor')
151 151 self.test_value(models['Background'][1].value(),
152   - 0.0126628793551562, 1.0e-4 * 0.0126628793551562,
  152 + 0.0117967073949693, 1.0e-4 * 0.0117967073949693,
153 153 'Check background model index')
154 154  
155 155 # Return
... ...
test/test_ctobssim.py
... ... @@ -86,7 +86,7 @@ class Test(test):
86 86  
87 87 # Load counts cube and check content.
88 88 evt = gammalib.GCTAEventList('ctobssim_cmd1.fits')
89   - self._test_list(evt, 3776)
  89 + self._test_list(evt, 3775)
90 90  
91 91 # Setup ctobssim command
92 92 cmd = ctobssim+' inmodel="model_that_does_not_exist.xml"'+ \
... ... @@ -152,21 +152,21 @@ class Test(test):
152 152  
153 153 # Check content of observation
154 154 self._test_observation(sim)
155   - self._test_list(sim.obs()[0].events(), 3776)
  155 + self._test_list(sim.obs()[0].events(), 3775)
156 156  
157 157 # Save events
158 158 sim.save()
159 159  
160 160 # Load counts cube and check content.
161 161 evt = gammalib.GCTAEventList('ctobssim_py1.fits')
162   - self._test_list(evt, 3776)
  162 + self._test_list(evt, 3775)
163 163  
164 164 # Copy ctobssim tool
165 165 cpy_sim = sim.copy()
166 166  
167 167 # Retrieve observation and check content of copy
168 168 self._test_observation(cpy_sim)
169   - self._test_list(cpy_sim.obs()[0].events(), 3776)
  169 + self._test_list(cpy_sim.obs()[0].events(), 3775)
170 170  
171 171 # Execute copy of ctobssim tool again, now with a higher chatter
172 172 # level than before
... ... @@ -179,7 +179,7 @@ class Test(test):
179 179  
180 180 # Load counts cube and check content.
181 181 evt = gammalib.GCTAEventList('ctobssim_py2.fits')
182   - self._test_list(evt, 3776)
  182 + self._test_list(evt, 3775)
183 183  
184 184 # Set-up observation container
185 185 pnts = [{'ra': 83.63, 'dec': 21.01},
... ... @@ -207,7 +207,7 @@ class Test(test):
207 207 # Retrieve observation and check content
208 208 self._test_observation(sim, nobs=2, pnts=pnts)
209 209 self._test_list(sim.obs()[0].events(), 3569)
210   - self._test_list(sim.obs()[1].events(), 3515)
  210 + self._test_list(sim.obs()[1].events(), 3521)
211 211  
212 212 # Save events
213 213 sim.save()
... ... @@ -217,7 +217,7 @@ class Test(test):
217 217  
218 218 # Retrieve observation and check content
219 219 self._test_list(obs[0].events(), 3569)
220   - self._test_list(obs[1].events(), 3515)
  220 + self._test_list(obs[1].events(), 3521)
221 221  
222 222 # Return
223 223 return
... ...