Changes in example/sesansfit.py [0a33675:33d38d5] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
example/sesansfit.py
r0a33675 r33d38d5 2 2 from bumps.names import * 3 3 4 from sasmodels import core, bumps_model 5 6 kernel = core.load_model("sphere", dtype='single') 7 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') 8 7 9 8 … … 12 11 from sas.dataloader.loader import Loader 13 12 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 18 16 data.x /=10 19 17 # print data 20 18 # data = load_sesans('mydatfile.pz') 21 19 # sans_data = load_sans('mysansfile.xml') … … 45 43 46 44 phi = Parameter(0.1, name="phi") 47 model = bumps_model.BumpsModel(data, kernel,45 model = sas.BumpsModel(data, kernel, 48 46 scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) 49 phi.range(0.001,0. 90)47 phi.range(0.001,0.5) 50 48 #model.radius.pmp(40) 51 model.radius.range(1 00,10000)52 #model.sld.pm p(5)49 model.radius.range(1,10000) 50 #model.sld.pm(5) 53 51 #model.background 54 52 #model.radius_pd=0 … … 56 54 57 55 if False: # have sans data 58 sansmodel = bumps_model.BumpsModel(sans_data, kernel, **model.parameters())56 sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters()) 59 57 problem = FitProblem([model, sansmodel]) 60 58 else:
Note: See TracChangeset
for help on using the changeset viewer.