Commit 350a888cd83bfe937c7c512f4bf2200d8ed58b01

Authored by Jürgen Knödlseder
1 parent 278920ea

Enable full test suite.

Showing 1 changed file with 13 additions and 12 deletions
test/science_verification.py
... ... @@ -137,7 +137,8 @@ def analyse_pull_distribution(filename):
137 137  
138 138 # Compute mean and standard deviations
139 139 for i in range(len(stds)):
140   - std = math.sqrt(stds[i]/samples - means[i]*means[i]/(samples*samples))
  140 + std = math.sqrt(stds[i]/samples -
  141 + means[i]*means[i]/(samples*samples))
141 142 stds[i] = std
142 143 means[i] /= samples
143 144  
... ... @@ -180,14 +181,14 @@ class sciver(gammalib.GPythonTestSuite):
180 181 self.name("Science Verification")
181 182  
182 183 # Append spectral tests
183   - #self.append(self.spec_plaw, "Test power law model")
184   - #self.append(self.spec_plaw2, "Test power law 2 model")
185   - #self.append(self.spec_eplaw, "Test exponentially cut off power law model")
186   - #self.append(self.spec_supeplaw, "Test super exponentially cut off power law model")
187   - #self.append(self.spec_logparabola, "Test log parabola model")
188   - #self.append(self.spec_gauss, "Test Gaussian model")
189   - #self.append(self.spec_filefct, "Test file function model")
190   - #self.append(self.spec_nodes, "Test nodes model")
  184 + self.append(self.spec_plaw, "Test power law model")
  185 + self.append(self.spec_plaw2, "Test power law 2 model")
  186 + self.append(self.spec_eplaw, "Test exponentially cut off power law model")
  187 + self.append(self.spec_supeplaw, "Test super exponentially cut off power law model")
  188 + self.append(self.spec_logparabola, "Test log parabola model")
  189 + self.append(self.spec_gauss, "Test Gaussian model")
  190 + self.append(self.spec_filefct, "Test file function model")
  191 + self.append(self.spec_nodes, "Test nodes model")
191 192  
192 193 # Append spatial tests
193 194 self.append(self.spec_ptsrc, "Test point source model")
... ... @@ -223,14 +224,14 @@ class sciver(gammalib.GPythonTestSuite):
223 224 """
224 225 # Test mean
225 226 mean = self.results[name]["mean"]
226   - valid = (mean >= -0.30) and (mean <= +0.30)
227   - text = "Mean "+str(mean)+" of "+name+" should be within [-0.3,0.3] range"
  227 + valid = (mean >= -0.40) and (mean <= +0.40)
  228 + text = "Mean %.5f of %s should be within [-0.4,0.4] range" % (mean, name)
228 229 self.test_assert(valid, text)
229 230  
230 231 # Test standard deviation
231 232 std = self.results[name]["std"]
232 233 valid = (std >= 0.80) and (std <= 1.20)
233   - text = "Standard deviation "+str(std)+" of "+name+" should be within [0.8,1.2] range"
  234 + text = "Standard deviation %.5f of %s should be within [0.8,1.2] range" % (std, name)
234 235 self.test_assert(valid, text)
235 236  
236 237 # Return
... ...