Commit f4062a962d51488fd6e7f15d83ed6548224a012f

Authored by Jürgen Knödlseder
1 parent 90e7ad0a

Add spatial cube model to science verification.

test/data/sciver/crab_cube.fits.gz 0 → 100644
No preview for this file type
test/data/sciver/crab_cube.xml 0 → 100644
  1 +<?xml version="1.0" standalone="no"?>
  2 +<source_library title="source library">
  3 + <source name="Crab" type="DiffuseSource">
  4 + <spectrum type="PowerLaw">
  5 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-07" max="1000.0" free="1"/>
  6 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  7 + <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
  8 + </spectrum>
  9 + <spatialModel type="MapCubeFunction" file="data/sciver/crab_cube.fits">
  10 + <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
  11 + </spatialModel>
  12 + </source>
  13 + <source name="Background" type="CTAIrfBackground" instrument="CTA">
  14 + <spectrum type="PowerLaw">
  15 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e3" free="1"/>
  16 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  17 + <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
  18 + </spectrum>
  19 + </source>
  20 +</source_library>
... ...
test/science_verification.py
... ... @@ -197,8 +197,9 @@ class sciver(gammalib.GPythonTestSuite):
197 197 #self.append(self.spat_rshell, "Test radial shell model")
198 198 #self.append(self.spat_edisk, "Test elliptical disk model")
199 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")
  200 + self.append(self.spat_const, "Test diffuse isotropic model")
  201 + self.append(self.spat_map, "Test diffuse map model")
  202 + self.append(self.spat_cube, "Test diffuse cube model")
202 203  
203 204 # Return
204 205 return
... ... @@ -435,6 +436,18 @@ class sciver(gammalib.GPythonTestSuite):
435 436 self.test("Pull_Background_Index")
436 437 return
437 438  
  439 + # Test diffuse isotropic model
  440 + def spat_const(self):
  441 + """
  442 + Test diffuse isotropic model.
  443 + """
  444 + self.pull("data/sciver/crab_const")
  445 + self.test("Pull_Crab_Prefactor")
  446 + self.test("Pull_Crab_Index")
  447 + self.test("Pull_Background_Prefactor")
  448 + self.test("Pull_Background_Index")
  449 + return
  450 +
438 451 # Test diffuse map model
439 452 def spat_map(self):
440 453 """
... ... @@ -447,12 +460,12 @@ class sciver(gammalib.GPythonTestSuite):
447 460 self.test("Pull_Background_Index")
448 461 return
449 462  
450   - # Test diffuse isotropic model
451   - def spat_const(self):
  463 + # Test diffuse cube model
  464 + def spat_cube(self):
452 465 """
453   - Test diffuse isotropic model.
  466 + Test diffuse cube model.
454 467 """
455   - self.pull("data/sciver/crab_const")
  468 + self.pull("data/sciver/crab_cube")
456 469 self.test("Pull_Crab_Prefactor")
457 470 self.test("Pull_Crab_Index")
458 471 self.test("Pull_Background_Prefactor")
... ...