Changeset 1374174f in sasview for park_integration/test


Ignore:
Timestamp:
Sep 22, 2008 4:07:53 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
3931a24e
Parents:
2e83ff3
Message:

Use common Loader. Fix test (A,B params were inverted)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/test/test_fit_line.py

    r916a15f r1374174f  
    1212        """ Fit 1 data (testdata_line.txt)and 1 model(lineModel)  """ 
    1313        #load data 
    14         from sans.fit.Loader import Load 
    15         load = Load() 
    16         load.set_filename("testdata_line.txt") 
    17         load.set_values() 
    18         data1 = Data1D(x=[], y=[],dx=None, dy=None) 
    19         load.load_data(data1) 
     14        from DataLoader.loader import Loader 
     15        data1 = Loader().load("testdata_line.txt") 
    2016        #Importing the Fit module 
    2117        from sans.fit.Fitting import Fit 
     
    157153        result2 = fitter.fit() 
    158154        self.assert_(result2) 
    159         self.assertTrue( ( math.fabs(result2.pvec[0]-4)/3 == result2.stderr[0] ) or  
    160                          ( math.fabs(result2.pvec[0]-4)/3 < result2.stderr[0]) )  
    161          
    162         self.assertTrue( ( math.fabs(result2.pvec[1]-2.5)/3 == result2.stderr[1] ) or 
    163                          ( math.fabs(result2.pvec[1]-2.5)/3 < result2.stderr[1]) ) 
     155        print result2.pvec[0],  result2.stderr[0] 
     156        print result2.pvec[1],  result2.stderr[1] 
     157        self.assertTrue( ( math.fabs(result2.pvec[0]-2.5)/3. < result2.stderr[0]) )  
     158         
     159        self.assertTrue( ( math.fabs(result2.pvec[1]-4.0)/3. < result2.stderr[1]) ) 
    164160        self.assertTrue(result2.fitness/49 < 2) 
    165161         
Note: See TracChangeset for help on using the changeset viewer.