Commit c04093bc93f65fffe8443d329804becd6ef212a4

Authored by Luigi Tibaldo
1 parent 7e3dfb73

fixed missing argument

Showing 1 changed file with 14 additions and 7 deletions
test/test_cslightcrv.py
... ... @@ -90,7 +90,7 @@ class Test(test):
90 90 'Check successful execution from command line')
91 91  
92 92 # Check light curve
93   - self._check_light_curve('lightcurve_cmd1.fits', 3)
  93 + self._check_light_curve('lightcurve_cmd1.fits', 3, 1.6e-16)
94 94  
95 95 # Setup cslightcrv command
96 96 cmd = cslightcrv+' inobs="events_that_do_not_exist.fits"'+ \
... ... @@ -142,7 +142,7 @@ class Test(test):
142 142 lcrv.save()
143 143  
144 144 # Check light curve
145   - self._check_light_curve('cslightcrv_py1.fits', 3)
  145 + self._check_light_curve('cslightcrv_py1.fits', 3, 1.6e-16)
146 146  
147 147 # Now use FILE as time bin algorithm. For this we need first to
148 148 # create an ASCII file. We use now 6 time bins. The ASCII file
... ... @@ -177,7 +177,7 @@ class Test(test):
177 177 lcrv.execute()
178 178  
179 179 # Check light curve
180   - self._check_light_curve('cslightcrv_py2.fits', 2)
  180 + self._check_light_curve('cslightcrv_py2.fits', 2, 1.6e-16)
181 181  
182 182 # Now we setup an observation container on input. We attached the
183 183 # model to the observation container so that cslightcrv should
... ... @@ -206,7 +206,7 @@ class Test(test):
206 206 lcrv.execute()
207 207  
208 208 # Check light curve
209   - self._check_light_curve('cslightcrv_py3.fits', 1)
  209 + self._check_light_curve('cslightcrv_py3.fits', 1, 1.6e-16)
210 210  
211 211 # Binned cslightcrv
212 212 lcrv = cscripts.cslightcrv()
... ... @@ -238,7 +238,7 @@ class Test(test):
238 238 lcrv.execute()
239 239  
240 240 # Check light curve
241   - self._check_light_curve('cslightcrv_py4.fits', 2)
  241 + self._check_light_curve('cslightcrv_py4.fits', 2, 1.6e-16)
242 242  
243 243 # cslightcrv with classical analysis
244 244 lcrv = cscripts.cslightcrv()
... ... @@ -268,13 +268,13 @@ class Test(test):
268 268 lcrv.execute()
269 269  
270 270 # Check light curve
271   - self._check_light_curve('cslightcrv_py5.fits', 2)
  271 + self._check_light_curve('cslightcrv_py5.fits', 2, 6.e-16)
272 272  
273 273 # Return
274 274 return
275 275  
276 276 # Check light curve result file
277   - def _check_light_curve(self, filename, bins):
  277 + def _check_light_curve(self, filename, bins,pref):
278 278 """
279 279 Check light curve file
280 280 """
... ... @@ -304,6 +304,13 @@ class Test(test):
304 304 self.test_assert(table.contains(col),
305 305 'FITS file contains "'+col+'" column')
306 306  
  307 + # Check that table has been filled
  308 + # Prefactor has right order of magnitude
  309 + for s in range(table.nrows()):
  310 + self.test_value(table['Prefactor'][s], pref, 0.2*pref,
  311 + 'Check prefactor value')
  312 +
  313 +
307 314 # Close FITS file
308 315 fits.close()
309 316  
... ...