Changeset 619

Show
Ignore:
Timestamp:
09/16/08 09:46:05 (2 months ago)
Author:
laidler
Message:

r618 caused a few tests to fail. After investigation, I determined these failures were either within the looser syn_pysyn acceptance criteria and loosened the criteria; or, that the code change revealed a real condition of the throughput files to which pysynphot is now properly sensitive, and so changed the reference answers accordingly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pysynphot/test/other_etc_test.py

    r573 r619  
    9898 
    9999class CalcphotTestCase(testutil.FPTestCase): 
     100    #Loosened accuracy for r618 (no taper) 
    100101    def setUp(self): 
    101102        self.sp = S.FileSpectrum(testdata) 
     
    106107        "countrate" 
    107108        countrate = self.obs.countrate() 
    108         self.assertApproxFP(countrate, values['countrate']
     109        self.assertApproxFP(countrate, values['countrate'],1e-4
    109110 
    110111    def testefflam(self): 
     
    112113        synphot_efflerg = 5304.462 
    113114        efflam = self.obs.efflam() 
    114         self.assertApproxFP(efflam, synphot_efflerg
     115        self.assertApproxFP(efflam, synphot_efflerg, 1e-4
    115116 
    116117 
     
    241242 
    242243    def test5cr(self): 
     244        #Loosened accuracy for r618 (no tapering) 
    243245        spectrum = "spectrum=rn(icat(k93models,5770,0.0,4.5),band(johnson,v),20.0,vegamag)" 
    244246        instrument = "instrument=acs,sbc,F125LP" 
    245247        parameters = [spectrum, instrument] 
    246248        countrate = etc.countrate(parameters) 
    247         self.assertApproxFP(countrate[0], 0.00015431, accuracy=0.0025
     249        self.assertApproxFP(countrate[0], 0.00015431, accuracy=0.003
    248250 
    249251 
     
    297299     
    298300    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. 
    299304        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))" 
    300305        instrument = "instrument=acs,sbc,F140LP" 
    301306        parameters = [spectrum, instrument] 
    302307        countrate = etc.countrate(parameters) 
    303         self.assertApproxFP(float(countrate[0]), 0.0834405
     308        self.assertApproxFP(float(countrate[0]), 0.0877036
    304309 
    305310 
     
    308313 
    309314    def test9(self): 
     315        #Changed answer for r618 (no tapering): this obsmode doesn't 
     316        #go all the way to zero with this comptab 
    310317        spectrum = "spectrum= rn(unit(1,flam),band(johnson,v),15.0,vegamag)" 
    311318        instrument = "instrument=stis,ccd" 
    312319        parameters = [spectrum, instrument] 
    313320        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) 
    315322 
    316323    def test10(self):