Changeset 0656250 in sasmodels for example


Ignore:
Timestamp:
Mar 24, 2015 4:24:43 AM (10 years ago)
Author:
jhbakker
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:
c210c94
Parents:
33d38d5 (diff), 0a33675 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Add SESANS example data

Location:
example
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • example/sesansfit.py

    r33d38d5 r0656250  
    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() 
     14<<<<<<< HEAD 
    1315    data=loader.load('se008724_01.ses') 
    1416#    data=loader.load('testsasview1.ses') 
    1517  
     18======= 
     19    filename = 'testsasview1.ses' 
     20    data=loader.load(filename) 
     21    if data is None: raise IOError("Could not load file %r"%(filename,)) 
     22    print dir(data), type(data) 
     23>>>>>>> 0a33675f5dfe63dcfc7345913a0bb44858641acc 
    1624    data.x /=10 
    1725#    print data 
     
    4351 
    4452phi = Parameter(0.1, name="phi") 
    45 model = sas.BumpsModel(data, kernel, 
     53model = bumps_model.BumpsModel(data, kernel, 
    4654    scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) 
    4755phi.range(0.001,0.5) 
     
    5462 
    5563if False: # have sans data 
    56     sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters()) 
     64    sansmodel = bumps_model.BumpsModel(sans_data, kernel, **model.parameters()) 
    5765    problem = FitProblem([model, sansmodel]) 
    5866else: 
Note: See TracChangeset for help on using the changeset viewer.