1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | from bumps.names import * |
---|
5 | from code_cylinder import GpuCylinder |
---|
6 | from code_lamellar import GpuLamellar |
---|
7 | from code_ellipse import GpuEllipse |
---|
8 | from code_coreshellcyl import GpuCoreShellCylinder |
---|
9 | from code_capcyl import GpuCapCylinder |
---|
10 | from code_triaxialellipse import GpuTriEllipse |
---|
11 | from sasmodel import SasModel, load_data, set_beam_stop, set_half |
---|
12 | |
---|
13 | |
---|
14 | data = load_data('DEC07282.DAT') |
---|
15 | set_beam_stop(data, 0.0048)#, outer=0.025) |
---|
16 | #set_half(data, 'right') |
---|
17 | """ |
---|
18 | model = SasModel(data, GpuCylinder, scale=0.09402, radius=106, length=442.298, |
---|
19 | sldCyl=.291e-6, sldSolv=5.77e-6, background=0, |
---|
20 | cyl_theta=0, cyl_phi=0, |
---|
21 | radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=0, |
---|
22 | length_pd=0.1, length_pd_n=5, length_pd_nsigma=0, |
---|
23 | cyl_theta_pd=0.1, cyl_theta_pd_n=10, cyl_theta_pd_nsigma=3, |
---|
24 | cyl_phi_pd=0.1, cyl_phi_pd_n=4, cyl_phi_pd_nsigma=3, |
---|
25 | dtype='float') |
---|
26 | model.radius.range(0, 1000) |
---|
27 | model.length.range(0, 1000) |
---|
28 | #model.cyl_theta.range(0,90) |
---|
29 | #model.cyl_phi.range(0,90) |
---|
30 | model.scale.range(0, 1) |
---|
31 | """ |
---|
32 | """ |
---|
33 | model = SasModel(data, GpuEllipse, |
---|
34 | scale=0.0007, radius_a=42.8251, radius_b=700, sldEll=.291e-6, sldSolv=7.105e-6, |
---|
35 | background=10, axis_theta=0, axis_phi=0, |
---|
36 | radius_a_pd=0.222296, radius_a_pd_n=1, radius_a_pd_nsigma=0, |
---|
37 | radius_b_pd=.000128, radius_b_pd_n=1, radius_b_pd_nsigma=0, |
---|
38 | axis_theta_pd=24.8059, axis_theta_pd_n=40, axis_theta_pd_nsigma=3, |
---|
39 | axis_phi_pd=2.63698e-05, axis_phi_pd_n=20, axis_phi_pd_nsigma=3, |
---|
40 | dtype='float') |
---|
41 | |
---|
42 | model.radius_a.range(15, 1000) |
---|
43 | #model.radius_b.range(15, 1000) |
---|
44 | #model.axis_theta_pd.range(0, 360) |
---|
45 | #model.background.range(0,1000) |
---|
46 | model.scale.range(0, 1) |
---|
47 | """ |
---|
48 | """ |
---|
49 | model = SasModel(data, GpuLamellar, scale=0.0128, bi_thick=35.1, sld_bi=.291e-6, sld_sol=5.77e-6, background=17.3, |
---|
50 | bi_thick_pd= 0.000009, bi_thick_pd_n=35, bi_thick_pd_nsigma=3, dtype='float') |
---|
51 | model.bi_thick.range(0, 1000) |
---|
52 | model.scale.range(0, 1) |
---|
53 | #model.bi_thick_pd.range(0, 1000) |
---|
54 | #model.background.range(0, 1000) |
---|
55 | """ |
---|
56 | """ |
---|
57 | model = SasModel(data, GpuCoreShellCylinder, |
---|
58 | scale= 1.77881e-06, radius=325, thickness=25, length=34.2709, |
---|
59 | core_sld=1e-6, shell_sld=.291e-6, solvent_sld=7.105e-6, |
---|
60 | background=223.827, axis_theta=90, axis_phi=0, |
---|
61 | axis_theta_pd=15.8, |
---|
62 | |
---|
63 | radius_pd=0.1, radius_pd_n=1, radius_pd_nsigma=0, |
---|
64 | length_pd=0.1, length_pd_n=1, length_pd_nsigma=0, |
---|
65 | thickness_pd=0.1, thickness_pd_n=1, thickness_pd_nsigma=0, |
---|
66 | axis_theta_pd_n=10, axis_theta_pd_nsigma=3, |
---|
67 | axis_phi_pd=0.0008748, axis_phi_pd_n=10, axis_phi_pd_nsigma=3, |
---|
68 | dtype='float') |
---|
69 | |
---|
70 | model.radius.range(15, 1000) |
---|
71 | #model.length.range(0, 1000) |
---|
72 | #model.thickness.range(20, 50) |
---|
73 | #model.axis_phi.range(0, 90) |
---|
74 | #model.radius_pd.range(0, 1) |
---|
75 | #model.radius_b_pd.range(0, 1) |
---|
76 | #model.axis_theta_pd.range(0, 360) |
---|
77 | #model.axis_phi_pd.range(0, 360) |
---|
78 | #model.background.range(0,1000) |
---|
79 | model.scale.range(0, 1) |
---|
80 | """ |
---|
81 | |
---|
82 | |
---|
83 | """ |
---|
84 | model = SasModel(data, GpuCapCylinder, scale=1, rad_cyl=20, rad_cap=40, length=400, sld_capcyl=1e-6, sld_solv=6.3e-6, |
---|
85 | background=0, theta=0, phi=0, rad_cyl_pd=.1, rad_cyl_pd_n=10, rad_cyl_nsigma=3, rad_cap_pd=.1, rad_cap_pd_n=1, |
---|
86 | rad_cap_pd_nsigma=3, length_pd=.1, length_pd_n=10, length_pd_nsigma=3, theta_pd=.1, theta_pd_n=4, |
---|
87 | theta_pd_nsigma=3, phi_pd=.1, phi_pd_n=4, phi_pd_nsigma=3, dtype='float') |
---|
88 | """ |
---|
89 | |
---|
90 | |
---|
91 | model = SasModel(data, GpuTriEllipse, |
---|
92 | scale=0.0036, axisA=118, axisB=70, axisC=800, |
---|
93 | sldEll=7.105e-6, sldSolv=.291e-6, |
---|
94 | background=15, theta=90, phi=0, psi=0, |
---|
95 | theta_pd=22, theta_pd_n=40, theta_pd_nsigma=3, |
---|
96 | phi_pd=.1, phi_pd_n=1, phi_pd_nsigma=0, |
---|
97 | psi_pd=30, psi_pd_n=1, psi_pd_nsigma=0, |
---|
98 | axisA_pd=.1, axisA_pd_n=1, axisA_pd_nsigma=0, |
---|
99 | axisB_pd=.1, axisB_pd_n=1, axisB_pd_nsigma=0, |
---|
100 | axisC_pd=.1, axisC_pd_n=1, axisC_pd_nsigma=0, dtype='float') |
---|
101 | |
---|
102 | #model.axisA.range(15, 1000) |
---|
103 | #model.axisB.range(15, 1000) |
---|
104 | #model.axisC.range(15, 1000) |
---|
105 | #model.background.range(0,1000) |
---|
106 | model.scale.range(0, 1) |
---|
107 | #model.theta_pd.range(0, 360) |
---|
108 | #model.phi_pd.range(0, 360) |
---|
109 | #model.psi_pd.range(0, 360) |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | |
---|
114 | |
---|
115 | problem = FitProblem(model) |
---|
116 | |
---|
117 | |
---|