1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | from bumps.names import * |
---|
5 | from cylcode import GpuCylinder |
---|
6 | from lamellarcode import GpuLamellar |
---|
7 | from ellipsecode import GpuEllipse |
---|
8 | from coreshellcylcode import GpuCoreShellCylinder |
---|
9 | from sasmodel import SasModel, load_data, set_beam_stop |
---|
10 | |
---|
11 | |
---|
12 | data = load_data('JUN03289.DAT') |
---|
13 | set_beam_stop(data, 0.004) |
---|
14 | """ |
---|
15 | model = SasModel(data, GpuCylinder, scale=1, radius=64.1, length=266.96, sldCyl=.291e-6, sldSolv=5.77e-6, background=0, |
---|
16 | cyl_theta=0, cyl_phi=0, radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=3,length_pd=0.1, |
---|
17 | length_pd_n=5, length_pd_nsigma=3, cyl_theta_pd=0.1, cyl_theta_pd_n=5, cyl_theta_pd_nsigma=3, |
---|
18 | cyl_phi_pd=0.1, cyl_phi_pd_n=10, cyl_phi_pd_nsigma=3, dtype='float32') |
---|
19 | model.radius.range(0,100) |
---|
20 | model.length.range(0, 1000) |
---|
21 | model.cyl_theta.range(0,90) |
---|
22 | model.cyl_phi.range(0,90) |
---|
23 | |
---|
24 | model = SasModel(data, GpuEllipse, scale=.027, radius_a=60, radius_b=180, sldEll=.297e-6, sldSolv=5.773e-6, background=4.9, |
---|
25 | axis_theta=0, axis_phi=90, radius_a_pd=0.1, radius_a_pd_n=10, radius_a_pd_nsigma=3, radius_b_pd=0.1, radius_b_pd_n=10, |
---|
26 | radius_b_pd_nsigma=3, axis_theta_pd=0.1, axis_theta_pd_n=6, axis_theta_pd_nsigma=3, axis_phi_pd=0.1, |
---|
27 | axis_phi_pd_n=6, axis_phi_pd_nsigma=3, dtype='float') |
---|
28 | |
---|
29 | model = SasModel(data, GpuLamellar, scale=1, bi_thick=100, sld_bi=.291e-6, sld_sol=5.77e-6, background=0, |
---|
30 | bi_thick_pd=0.1, bi_thick_pd_n=35, bi_thick_pd_nsigma=3, dtype='float') |
---|
31 | |
---|
32 | """ |
---|
33 | model = SasModel(data, GpuCoreShellCylinder, scale=1, radius=64.1, thickness=1, length=266.96, core_sld=1e-6, shell_sld=4e-6, |
---|
34 | solvent_sld=1e-6, background=0, axis_theta=0, axis_phi=0, radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=3, |
---|
35 | length_pd=0.1, length_pd_n=10, length_pd_nsigma=3, thickness_pd=0.1, thickness_pd_n=2, thickness_pd_nsigma=3, |
---|
36 | axis_theta_pd=0.1, axis_theta_pd_n=2, axis_theta_pd_nsigma=3, axis_phi_pd=0.1, axis_phi_pd_n=2, |
---|
37 | axis_phi_pd_nsigma=3, dtype='float') |
---|
38 | |
---|
39 | model = SasModel(data, GpuCapCylinder, scale, rad_cyl, rad_cap, length, sld_capcyl, sld_solv, background, theta, phi, |
---|
40 | rad_cyl_pd, rad_cyl_pd_n, rad_cyl_nsigma, rad_cap_pd, rad_cap_pd_n, rad_cap_pd_nsigma, length_) |
---|
41 | |
---|
42 | model.scale.range(0,10) |
---|
43 | |
---|
44 | problem = FitProblem(model) |
---|
45 | |
---|
46 | |
---|