Commit 90e7ad0a6c7d34f040f0604b0613b7183d79fb57

Authored by Jürgen Knödlseder
1 parent f5590e98

Add isotropic diffuse model to science verification.

Showing 1 changed file with 27 additions and 14 deletions
test/science_verification.py
@@ -191,13 +191,14 @@ class sciver(gammalib.GPythonTestSuite): @@ -191,13 +191,14 @@ class sciver(gammalib.GPythonTestSuite):
191 #self.append(self.spec_nodes, "Test nodes model") 191 #self.append(self.spec_nodes, "Test nodes model")
192 192
193 # Append spatial tests 193 # Append spatial tests
194 - #self.append(self.spec_ptsrc, "Test point source model")  
195 - #self.append(self.spec_rdisk, "Test radial disk model")  
196 - #self.append(self.spec_rgauss, "Test radial Gaussian model")  
197 - #self.append(self.spec_rshell, "Test radial shell model")  
198 - #self.append(self.spec_edisk, "Test elliptical disk model")  
199 - #self.append(self.spec_egauss, "Test elliptical Gaussian model")  
200 - self.append(self.spec_map, "Test diffuse map model") 194 + #self.append(self.spat_ptsrc, "Test point source model")
  195 + #self.append(self.spat_rdisk, "Test radial disk model")
  196 + #self.append(self.spat_rgauss, "Test radial Gaussian model")
  197 + #self.append(self.spat_rshell, "Test radial shell model")
  198 + #self.append(self.spat_edisk, "Test elliptical disk model")
  199 + #self.append(self.spat_egauss, "Test elliptical Gaussian model")
  200 + #self.append(self.spat_map, "Test diffuse map model")
  201 + self.append(self.spat_const, "Test diffuse const model")
201 202
202 # Return 203 # Return
203 return 204 return
@@ -341,7 +342,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -341,7 +342,7 @@ class sciver(gammalib.GPythonTestSuite):
341 return 342 return
342 343
343 # Test point source model 344 # Test point source model
344 - def spec_ptsrc(self): 345 + def spat_ptsrc(self):
345 """ 346 """
346 Test point source model. 347 Test point source model.
347 """ 348 """
@@ -355,7 +356,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -355,7 +356,7 @@ class sciver(gammalib.GPythonTestSuite):
355 return 356 return
356 357
357 # Test radial disk model 358 # Test radial disk model
358 - def spec_rdisk(self): 359 + def spat_rdisk(self):
359 """ 360 """
360 Test radial disk model. 361 Test radial disk model.
361 """ 362 """
@@ -370,7 +371,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -370,7 +371,7 @@ class sciver(gammalib.GPythonTestSuite):
370 return 371 return
371 372
372 # Test radial Gaussian model 373 # Test radial Gaussian model
373 - def spec_rgauss(self): 374 + def spat_rgauss(self):
374 """ 375 """
375 Test radial Gaussian model. 376 Test radial Gaussian model.
376 """ 377 """
@@ -385,7 +386,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -385,7 +386,7 @@ class sciver(gammalib.GPythonTestSuite):
385 return 386 return
386 387
387 # Test radial shell model 388 # Test radial shell model
388 - def spec_rshell(self): 389 + def spat_rshell(self):
389 """ 390 """
390 Test radial shell model. 391 Test radial shell model.
391 """ 392 """
@@ -401,7 +402,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -401,7 +402,7 @@ class sciver(gammalib.GPythonTestSuite):
401 return 402 return
402 403
403 # Test elliptical disk model 404 # Test elliptical disk model
404 - def spec_edisk(self): 405 + def spat_edisk(self):
405 """ 406 """
406 Test elliptical disk model. 407 Test elliptical disk model.
407 """ 408 """
@@ -418,7 +419,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -418,7 +419,7 @@ class sciver(gammalib.GPythonTestSuite):
418 return 419 return
419 420
420 # Test elliptical Gaussian model 421 # Test elliptical Gaussian model
421 - def spec_egauss(self): 422 + def spat_egauss(self):
422 """ 423 """
423 Test elliptical Gaussian model. 424 Test elliptical Gaussian model.
424 """ 425 """
@@ -435,7 +436,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -435,7 +436,7 @@ class sciver(gammalib.GPythonTestSuite):
435 return 436 return
436 437
437 # Test diffuse map model 438 # Test diffuse map model
438 - def spec_map(self): 439 + def spat_map(self):
439 """ 440 """
440 Test diffuse map model. 441 Test diffuse map model.
441 """ 442 """
@@ -446,6 +447,18 @@ class sciver(gammalib.GPythonTestSuite): @@ -446,6 +447,18 @@ class sciver(gammalib.GPythonTestSuite):
446 self.test("Pull_Background_Index") 447 self.test("Pull_Background_Index")
447 return 448 return
448 449
  450 + # Test diffuse isotropic model
  451 + def spat_const(self):
  452 + """
  453 + Test diffuse isotropic model.
  454 + """
  455 + self.pull("data/sciver/crab_const")
  456 + self.test("Pull_Crab_Prefactor")
  457 + self.test("Pull_Crab_Index")
  458 + self.test("Pull_Background_Prefactor")
  459 + self.test("Pull_Background_Index")
  460 + return
  461 +
449 462
450 # ======================== # 463 # ======================== #
451 # Main routine entry point # 464 # Main routine entry point #