Changeset e806077 in sasmodels
 Timestamp:
 Feb 18, 2015 9:25:56 AM (5 years ago)
 Branches:
 master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket1257vesicleproduct, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
 Children:
 3a45c2c, 5428233, 0ac3db5
 Parents:
 c97724e
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

example/sesansfit.py
rc97724e re806077 5 5 kernel = sas.load_model('sphere', dtype='single') 6 6 7 7 8 radius = 1000 9 if False: # fix when data loader exists 10 from sasmodels.dataloader import load_sesans, load_sans 11 data = load_sesans('mydatfile.pz') 12 sans_data = load_sans('mysansfile.xml') 13 else: 14 SElength = np.linspace(0, 2400, 61) # [A] 15 data = np.ones_like(SElength) 16 err_data = np.ones_like(SElength)*0.03 8 17 9 SElength = np.linspace(0, 2400, 61) # [A] 10 data = np.ones_like(SElength) 11 err_data = np.ones_like(SElength)*0.03 12 13 class SesansData: 14 #q_zmax = 0.23 # [A^1] 15 q_zmax = 0.1 # [A^1] 16 SElength = np.linspace(0, 2400, 61) # [A] 17 Rmax = 3*radius # [A] 18 wavelength = 2e10 # [m] 19 thickness = 0.2 # [cm] 20 SElength = SElength 21 data = data 22 err_data = err_data 23 data = SesansData() 18 class SesansData: 19 #q_zmax = 0.23 # [A^1] 20 q_zmax = 0.1 # [A^1] 21 SElength = np.linspace(0, 2400, 61) # [A] 22 Rmax = 3*radius # [A] 23 wavelength = 2e10 # [m] 24 thickness = 0.2 # [cm] 25 SElength = SElength 26 data = data 27 err_data = err_data 28 data = SesansData() 24 29 25 30 phi = Parameter(0.1, name="phi") … … 31 36 model.background.range(0,5) 32 37 33 problem = FitProblem(model)34 38 39 if False: # have sans data 40 sansmodel = sas.BumpsModel(sans_data, kernel, **model.parameters()) 41 problem = FitProblem([model, sansmodel]) 42 else: 43 problem = FitProblem(model) 44
Note: See TracChangeset
for help on using the changeset viewer.