Changeset fa5908de in sasview for park_integration


Ignore:
Timestamp:
Sep 12, 2008 5:17:13 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
1ed9c57
Parents:
4fc6dbf
Message:

more testing lorentzian model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/test/testnewscipy.py

    r388309d rfa5908de  
    1515        from sans.fit.Loader import Load 
    1616        load= Load() 
    17         load.set_filename("testdata_line.txt") 
     17        load.set_filename("cyl_testdata.txt") 
    1818        load.set_values() 
    1919        data11 = Data1D(x=[], y=[],dx=None, dy=None) 
     
    2525         
    2626        # Receives the type of model for the fitting 
    27         from sans.guitools.LineModel import LineModel 
    28         model1  = LineModel() 
     27        from sans.models.Lorentzian import Lorentzian 
     28        model1  = Lorentzian() 
    2929        data1=Data(sans_data=data11) 
    3030        model =Model(model1) 
    3131        #Do the fit SCIPY 
    32         
     32        pars1=['center','gamma','scale'] 
    3333        fitter.set_data(data1,1) 
    34         fitter.set_model(model,"M1",1,['A','B']) 
    35      
     34        fitter.set_model(model,"M1",1,pars1) 
     35         
    3636        result=fitter.fit() 
    37         print "park",result.pvec, 
     37        print "park1",result.pvec,result.fitness,result.cov 
    3838         
    3939        self.assert_(result) 
     
    7171       
    7272        result=fitter.fit() 
    73         print "park",result.fitness,result.cov, result.pvec 
     73        print "park2",result.fitness,result.cov, result.pvec 
    7474        self.assert_(result.fitness) 
    7575         
Note: See TracChangeset for help on using the changeset viewer.