1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | from bumps.names import * |
---|
5 | from Models.code_coreshellcyl import GpuCoreShellCylinder |
---|
6 | from sasmodel import SasModel, load_data, set_beam_stop, set_top |
---|
7 | |
---|
8 | |
---|
9 | radial_data = load_data('December/DEC07267.DAT') |
---|
10 | set_beam_stop(radial_data, 0.00669, outer=0.025) |
---|
11 | set_top(radial_data, -.0185) |
---|
12 | |
---|
13 | tan_data = load_data('December/DEC07266.DAT') |
---|
14 | set_beam_stop(tan_data, 0.00669, outer=0.025) |
---|
15 | set_top(tan_data, -.0185) |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | dtype='float32' |
---|
21 | radial = SasModel(radial_data, |
---|
22 | GpuCoreShellCylinder, |
---|
23 | scale= 3.75e-7, radius=378, thickness=30, length=1806, |
---|
24 | core_sld=7.105e-6, shell_sld=.291e-6, solvent_sld=7.105e-6, |
---|
25 | background=0.2, axis_theta=0, axis_phi=90, |
---|
26 | |
---|
27 | radius_pd=0.26, radius_pd_n=20, radius_pd_nsigma=3, |
---|
28 | length_pd=0.26, length_pd_n=20, length_pd_nsigma=3, |
---|
29 | thickness_pd=1, thickness_pd_n=1, thickness_pd_nsigma=0, |
---|
30 | axis_theta_pd=1, axis_theta_pd_n=10, axis_theta_pd_nsigma=3, |
---|
31 | axis_phi_pd=0.1, axis_phi_pd_n=1, axis_phi_pd_nsigma=0, |
---|
32 | dtype='float') |
---|
33 | tan = SasModel(tan_data, |
---|
34 | GpuCoreShellCylinder, dtype=dtype, |
---|
35 | **radial.parameters()) |
---|
36 | |
---|
37 | radial.radius.range(15, 1000) |
---|
38 | radial.length.range(0, 2500) |
---|
39 | #radial.thickness.range(18, 38) |
---|
40 | #radial.thickness_pd.range(0, 1) |
---|
41 | #radial.axis_phi.range(0, 90) |
---|
42 | #radial.radius_pd.range(0, 1) |
---|
43 | #radial.length_pd.range(0, 1) |
---|
44 | #radial.axis_theta_pd.range(0, 360) |
---|
45 | #radial.background.range(0,5) |
---|
46 | #radial.scale.range(0, 1) |
---|
47 | radial.axis_phi = tan.axis_phi + 90 |
---|
48 | |
---|
49 | |
---|
50 | problem = FitProblem([radial,tan]) |
---|
51 | |
---|
52 | |
---|
53 | |
---|