Changeset 619
- Timestamp:
- 09/16/08 09:46:05 (2 months ago)
- Files:
-
- trunk/pysynphot/test/other_etc_test.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pysynphot/test/other_etc_test.py
r573 r619 98 98 99 99 class CalcphotTestCase(testutil.FPTestCase): 100 #Loosened accuracy for r618 (no taper) 100 101 def setUp(self): 101 102 self.sp = S.FileSpectrum(testdata) … … 106 107 "countrate" 107 108 countrate = self.obs.countrate() 108 self.assertApproxFP(countrate, values['countrate'] )109 self.assertApproxFP(countrate, values['countrate'],1e-4) 109 110 110 111 def testefflam(self): … … 112 113 synphot_efflerg = 5304.462 113 114 efflam = self.obs.efflam() 114 self.assertApproxFP(efflam, synphot_efflerg )115 self.assertApproxFP(efflam, synphot_efflerg, 1e-4) 115 116 116 117 … … 241 242 242 243 def test5cr(self): 244 #Loosened accuracy for r618 (no tapering) 243 245 spectrum = "spectrum=rn(icat(k93models,5770,0.0,4.5),band(johnson,v),20.0,vegamag)" 244 246 instrument = "instrument=acs,sbc,F125LP" 245 247 parameters = [spectrum, instrument] 246 248 countrate = etc.countrate(parameters) 247 self.assertApproxFP(countrate[0], 0.00015431, accuracy=0.00 25)249 self.assertApproxFP(countrate[0], 0.00015431, accuracy=0.003) 248 250 249 251 … … 297 299 298 300 def test6(self): 301 #Replaced answer for r618 (no tapering) 302 #The throughput files used in this case don't actually go 303 #all the way to zero. 299 304 spectrum = "spectrum=((earthshine.fits*0.5)%2brn(spec(Zodi.fits),band(V),22.7,vegamag)%2b(el1215a.fits*0.5)%2b(el1302a.fits*0.5)%2b(el1356a.fits*0.5)%2b(el2471a.fits*0.5))" 300 305 instrument = "instrument=acs,sbc,F140LP" 301 306 parameters = [spectrum, instrument] 302 307 countrate = etc.countrate(parameters) 303 self.assertApproxFP(float(countrate[0]), 0.08 34405)308 self.assertApproxFP(float(countrate[0]), 0.0877036) 304 309 305 310 … … 308 313 309 314 def test9(self): 315 #Changed answer for r618 (no tapering): this obsmode doesn't 316 #go all the way to zero with this comptab 310 317 spectrum = "spectrum= rn(unit(1,flam),band(johnson,v),15.0,vegamag)" 311 318 instrument = "instrument=stis,ccd" 312 319 parameters = [spectrum, instrument] 313 320 countrate = etc.countrate(parameters) 314 self.assertApproxFP(float(countrate[0]), 36130.9, accuracy=0.0025)321 self.assertApproxFP(float(countrate[0]), 40470.7, accuracy=0.0025) 315 322 316 323 def test10(self):
