Changes in example/sesansfit.py [33d38d5:0a33675] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • example/sesansfit.py

    r33d38d5 r0a33675  
    22from bumps.names import * 
    33 
    4 from sasmodels import bumps_model as sas 
    5 kernel = sas.load_model('sphere', dtype='single') 
    6 #kernel = sas.load_model('triaxial_ellipsoid', dtype='single') 
     4from sasmodels import core, bumps_model 
     5 
     6kernel = core.load_model("sphere", dtype='single') 
     7 
    78 
    89 
     
    1112    from sas.dataloader.loader import Loader 
    1213    loader=Loader() 
    13     data=loader.load('se008724_01.ses') 
    14 #    data=loader.load('testsasview1.ses') 
    15   
     14    filename = 'testsasview1.ses' 
     15    data=loader.load(filename) 
     16    if data is None: raise IOError("Could not load file %r"%(filename,)) 
     17    print dir(data), type(data) 
    1618    data.x /=10 
    17 #    print data 
     19     
    1820#    data = load_sesans('mydatfile.pz') 
    1921#    sans_data = load_sans('mysansfile.xml') 
     
    4345 
    4446phi = Parameter(0.1, name="phi") 
    45 model = sas.BumpsModel(data, kernel, 
     47model = bumps_model.BumpsModel(data, kernel, 
    4648    scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) 
    47 phi.range(0.001,0.5) 
     49phi.range(0.001,0.90) 
    4850#model.radius.pmp(40) 
    49 model.radius.range(1,10000) 
    50 #model.sld.pm(5) 
     51model.radius.range(100,10000) 
     52#model.sld.pmp(5) 
    5153#model.background 
    5254#model.radius_pd=0 
     
    5456 
    5557if False: # have sans data 
    56     sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters()) 
     58    sansmodel = bumps_model.BumpsModel(sans_data, kernel, **model.parameters()) 
    5759    problem = FitProblem([model, sansmodel]) 
    5860else: 
Note: See TracChangeset for help on using the changeset viewer.