source: sasmodels/example/oriented_usans.py @ 7624dd3

Last change on this file since 7624dd3 was 74b0495, checked in by Paul Kienzle <pkienzle@…>, 7 years ago

update oriented sesans and simultaneous fit examples

  • Property mode set to 100644
File size: 1.2 KB
Line 
1from bumps.names import *
2
3from sasmodels.data import load_data
4from sasmodels.core import load_model
5from sasmodels.bumps_model import Model, Experiment
6
7# Spherical particle data, not ellipsoids
8sans, usans = load_data('latex_smeared.xml', index='all')
9usans.qmin, usans.qmax = np.min(usans.x), np.max(usans.x)
10usans.mask = (usans.x < 0.0)
11usans.oriented = True
12#print sans.dxl, usans.dxl
13#import pprint; pprint.pprint(sans.__dict__)
14
15kernel = load_model("ellipsoid")
16
17model = Model(
18    kernel,
19    scale=0.08, background=0,
20    sld=.291, sld_solvent=7.105,
21    radius_polar=1800, radius_polar_pd=0.222296, radius_polar_pd_n=0,
22    radius_equatorial=2600, radius_equatorial_pd=0.28, radius_equatorial_pd_n=0,
23    theta=60, theta_pd=0, theta_pd_n=0,
24    phi=60, phi_pd=0, phi_pd_n=0,
25    )
26
27# SET THE FITTING PARAMETERS
28model.radius_polar.range(1000, 10000)
29model.radius_equatorial.range(1000, 10000)
30model.theta.range(0, 360)
31model.phi.range(0, 360)
32model.background.range(0,1000)
33model.scale.range(0, 10)
34
35
36#cutoff = 0     # no cutoff on polydisperisity loops
37#cutoff = 1e-5  # default cutoff
38cutoff = 1e-3  # low precision cutoff
39M = Experiment(data=usans, model=model, cutoff=cutoff)
40problem = FitProblem(M)
41
Note: See TracBrowser for help on using the repository browser.