Commit 6855ef9402334d12ed869ea143a2cae73eab910c

Authored by Jürgen Knödlseder
1 parent ce677783

Add cssens test for integral sensitivity

Showing 1 changed file with 24 additions and 1 deletions
test/test_cssens.py
... ... @@ -107,7 +107,7 @@ class Test(test):
107 107 """
108 108 Test cssens from Python
109 109 """
110   - # Set-up cssens
  110 + # Set-up cssens for differential sensitivity computation
111 111 sens = cscripts.cssens()
112 112 sens['inobs'] = 'NONE'
113 113 sens['inmodel'] = self._model
... ... @@ -131,6 +131,29 @@ class Test(test):
131 131 # Check pull distribution file
132 132 self._check_result_file('cssens_py1.dat')
133 133  
  134 + # Set-up cssens for integral sensitivity computation
  135 + sens = cscripts.cssens()
  136 + sens['inobs'] = 'NONE'
  137 + sens['inmodel'] = self._model
  138 + sens['srcname'] = 'Crab'
  139 + sens['caldb'] = self._caldb
  140 + sens['irf'] = self._irf
  141 + sens['outfile'] = 'cssens_py2.dat'
  142 + sens['duration'] = 1800.0
  143 + sens['rad'] = 3.0
  144 + sens['emin'] = 1.0
  145 + sens['emax'] = 10.0
  146 + sens['bins'] = 1
  147 + sens['type'] = 'Integral'
  148 + sens['logfile'] = 'cssens_py2.log'
  149 + sens['chatter'] = 4
  150 +
  151 + # Execute cssens script
  152 + sens.execute()
  153 +
  154 + # Check pull distribution file
  155 + self._check_result_file('cssens_py2.dat')
  156 +
134 157 # Return
135 158 return
136 159  
... ...