1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | from bumps.names import * |
---|
5 | from cylcode import GpuCylinder |
---|
6 | from Models.sasmodel import SasModel, load_data, set_beam_stop |
---|
7 | |
---|
8 | |
---|
9 | radial_data = load_data('JUN03289.DAT') |
---|
10 | set_beam_stop(radial_data, 0.004) |
---|
11 | trans_data = load_data('JUN03305.DAT') |
---|
12 | set_beam_stop(trans_data, 0.004) |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | dtype='float32' |
---|
18 | radial = SasModel(radial_data, |
---|
19 | GpuCylinder, dtype=dtype, |
---|
20 | scale=1, radius=64.1, length=266.96, sldCyl=.291e-6, sldSolv=5.77e-6, background=0, |
---|
21 | cyl_theta=0, cyl_phi=0, radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=3,length_pd=0.1, |
---|
22 | length_pd_n=5, length_pd_nsigma=3, cyl_theta_pd=0.1, cyl_theta_pd_n=5, cyl_theta_pd_nsigma=3, |
---|
23 | cyl_phi_pd=0.1, cyl_phi_pd_n=10, cyl_phi_pd_nsigma=3) |
---|
24 | trans = SasModel(trans_data, |
---|
25 | GpuCylinder, dtype=dtype, |
---|
26 | **radial.parameters()) |
---|
27 | |
---|
28 | radial.radius.range(0,100) |
---|
29 | radial.length.range(0, 1000) |
---|
30 | radial.cyl_theta.range(0,90) |
---|
31 | radial.cyl_phi.range(0,90) |
---|
32 | radial.scale.range(0,10) |
---|
33 | trans.cyl_theta = radial.cyl_theta + 90. |
---|
34 | |
---|
35 | |
---|
36 | problem = FitProblem([radial,trans]) |
---|
37 | |
---|
38 | |
---|
39 | |
---|