Changeset 9f7fbd9 in sasview for test/sasfit


Ignore:
Timestamp:
Mar 24, 2015 3:28:54 PM (10 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
66f21cd
Parents:
0efb04d
Message:

rewrite slit smearing for usans

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/sasfit/test/utest_fit_smeared.py

    refa5e44 r9f7fbd9  
    165165    def test_slit(self): 
    166166        smear = smear_selection(self.data_slit) 
    167         self.assertEqual(smear.__class__.__name__, 'SlitSmearer') 
     167        #self.assertEqual(smear.__class__.__name__, 'SlitSmearer') 
     168        self.assertEqual(smear.__class__.__name__, 'PySlitSmearer') 
    168169 
    169170        fitter = Fit('bumps') 
     
    181182         
    182183        result1, = fitter.fit() 
    183          
     184 
    184185        #print "v",result1.pvec 
    185186        #print "dv",result1.stderr 
    186187        #print "chisq(v)",result1.fitness 
    187          
    188         self.assertTrue( math.fabs(result1.pvec[0]-2340) < 20 ) 
    189         self.assertTrue( math.fabs(result1.pvec[1]-0.010) < 0.002 ) 
     188 
     189        numpy.testing.assert_allclose(result1.pvec, [2323.466,0.22137], rtol=0.001) 
    190190 
    191191if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.