- Timestamp:
- Nov 22, 2015 11:37:15 PM (9 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:
- 3b4243d
- Parents:
- 677ccf1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
example/fit.py
r346bc88 r7cf2cfd 5 5 from bumps.names import * 6 6 from sasmodels.core import load_model 7 from sasmodels import bumps_model as sas 7 from sasmodels.bumps_model import Model, Experiment 8 from sasmodels.data import load_data, set_beam_stop, set_top 8 9 9 10 """ IMPORT THE DATA USED """ 10 radial_data = sas.load_data('DEC07267.DAT')11 s as.set_beam_stop(radial_data, 0.00669, outer=0.025)12 s as.set_top(radial_data, -.0185)11 radial_data = load_data('DEC07267.DAT') 12 set_beam_stop(radial_data, 0.00669, outer=0.025) 13 set_top(radial_data, -.0185) 13 14 14 tan_data = sas.load_data('DEC07266.DAT')15 s as.set_beam_stop(tan_data, 0.00669, outer=0.025)16 s as.set_top(tan_data, -.0185)15 tan_data = load_data('DEC07266.DAT') 16 set_beam_stop(tan_data, 0.00669, outer=0.025) 17 set_top(tan_data, -.0185) 17 18 #sas.set_half(tan_data, 'right') 18 19 … … 28 29 29 30 if name == "ellipsoid": 30 model = sas.Model(kernel,31 model = Model(kernel, 31 32 scale=0.08, 32 33 rpolar=15, requatorial=800, … … 51 52 52 53 elif name == "lamellar": 53 model = sas.Model(kernel,54 model = Model(kernel, 54 55 scale=0.08, 55 56 thickness=19.2946, … … 87 88 theta_pd=10, theta_pd_n=50, theta_pd_nsigma=3, 88 89 phi_pd=0, phi_pd_n=10, phi_pd_nsigma=3) 89 model = sas.Model(kernel, **pars)90 model = Model(kernel, **pars) 90 91 91 92 # SET THE FITTING PARAMETERS … … 102 103 103 104 elif name == "core_shell_cylinder": 104 model = sas.Model(kernel,105 model = Model(kernel, 105 106 scale= .031, radius=19.5, thickness=30, length=22, 106 107 core_sld=7.105, shell_sld=.291, solvent_sld=7.105, … … 129 130 130 131 elif name == "capped_cylinder": 131 model = sas.Model(kernel,132 model = Model(kernel, 132 133 scale=.08, radius=20, cap_radius=40, length=400, 133 134 sld_capcyl=1, sld_solv=6.3, … … 144 145 145 146 elif name == "triaxial_ellipsoid": 146 model = sas.Model(kernel,147 model = Model(kernel, 147 148 scale=0.08, req_minor=15, req_major=20, rpolar=500, 148 149 sldEll=7.105, solvent_sld=.291, … … 170 171 171 172 model.cutoff = cutoff 172 M = sas.Experiment(data=data, model=model)173 M = Experiment(data=data, model=model) 173 174 if section == "both": 174 tan_model = sas.Model(model.kernel, **model.parameters())175 tan_model = Model(model.kernel, **model.parameters()) 175 176 tan_model.phi = model.phi - 90 176 177 tan_model.cutoff = cutoff 177 tan_M = sas.Experiment(data=tan_data, model=tan_model)178 tan_M = Experiment(data=tan_data, model=tan_model) 178 179 problem = FitProblem([M, tan_M]) 179 180 else:
Note: See TracChangeset
for help on using the changeset viewer.