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


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • example/sesansfit.py

    r0a33675 r33d38d5  
    22from bumps.names import * 
    33 
    4 from sasmodels import core, bumps_model 
    5  
    6 kernel = core.load_model("sphere", dtype='single') 
    7  
     4from sasmodels import bumps_model as sas 
     5kernel = sas.load_model('sphere', dtype='single') 
     6#kernel = sas.load_model('triaxial_ellipsoid', dtype='single') 
    87 
    98 
     
    1211    from sas.dataloader.loader import Loader 
    1312    loader=Loader() 
    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) 
     13    data=loader.load('se008724_01.ses') 
     14#    data=loader.load('testsasview1.ses') 
     15  
    1816    data.x /=10 
    19      
     17#    print data 
    2018#    data = load_sesans('mydatfile.pz') 
    2119#    sans_data = load_sans('mysansfile.xml') 
     
    4543 
    4644phi = Parameter(0.1, name="phi") 
    47 model = bumps_model.BumpsModel(data, kernel, 
     45model = sas.BumpsModel(data, kernel, 
    4846    scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) 
    49 phi.range(0.001,0.90) 
     47phi.range(0.001,0.5) 
    5048#model.radius.pmp(40) 
    51 model.radius.range(100,10000) 
    52 #model.sld.pmp(5) 
     49model.radius.range(1,10000) 
     50#model.sld.pm(5) 
    5351#model.background 
    5452#model.radius_pd=0 
     
    5654 
    5755if False: # have sans data 
    58     sansmodel = bumps_model.BumpsModel(sans_data, kernel, **model.parameters()) 
     56    sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters()) 
    5957    problem = FitProblem([model, sansmodel]) 
    6058else: 
Note: See TracChangeset for help on using the changeset viewer.