Changeset 0a33675 in sasmodels
- Timestamp:
- Mar 23, 2015 3:49:13 PM (10 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c
- Parents:
- bcd3aa3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
example/sesansfit.py
r9c117a2 r0a33675 2 2 from bumps.names import * 3 3 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') 4 from sasmodels import core, bumps_model 5 6 kernel = core.load_model("sphere", dtype='single') 7 7 8 8 9 … … 11 12 from sas.dataloader.loader import Loader 12 13 loader=Loader() 13 data=loader.load('testsasview1.ses') 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) 14 18 data.x /=10 15 19 … … 41 45 42 46 phi = Parameter(0.1, name="phi") 43 model = sas.BumpsModel(data, kernel,47 model = bumps_model.BumpsModel(data, kernel, 44 48 scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) 45 49 phi.range(0.001,0.90) … … 52 56 53 57 if False: # have sans data 54 sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters())58 sansmodel = bumps_model.BumpsModel(sans_data, kernel, **model.parameters()) 55 59 problem = FitProblem([model, sansmodel]) 56 60 else:
Note: See TracChangeset
for help on using the changeset viewer.