source: sasmodels/example/oriented_usans.py @ a90aa1c

core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since a90aa1c was ea75043, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

add support for oriented usans using direct 2d resolution integral

  • 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('../../sasview/sasview/test/1d_data/latex_smeared.xml')
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    r_polar=1800, r_polar_pd=0.222296, r_polar_pd_n=0,
22    r_equatorial=2600, r_equatorial_pd=0.28, r_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.r_polar.range(1000, 10000)
29model.r_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.