1
2
3
4
5 import par_form,par_structure,plotting,BornModel
6
7 from numpy import array, sum, linspace, zeros, sqrt, exp, log10,shape,size,pi
8
9
10
11
12
13
14 struc = par_structure.Rectilinear(Dx = 100000,nx = 100)
15
16
17
18 depth = array([200,100,600],'d')
19 SLD = array([3.4673e-6,3.01e-6,4.5068e-6],'d')
20 depth,SLD = depth[0:size(depth)],SLD[0:size(depth)]
21
22 feature_form = par_form.Parallelapiped(50000,50000,depth,SLD)
23
24 phi = 0
25
26
27 thickness = array([],'d')
28 SLD_sub = array([],'d')
29 thickness,SLD_sub = thickness[0:size(thickness)],SLD_sub[0:size(thickness)]
30
31 substrate_form = par_form.Substrate(struc.Dx,struc.Dy,thickness,SLD_sub)
32
33
34
35 plot_points = 2000
36
37
38 maxqx = 0.00060
39 maxqy = 0.009
40 maxqz = 0.07
41 qx = linspace(-maxqx,maxqx,plot_points+1)
42 qz = linspace(1.0e-6,maxqz,plot_points-1)
43 qy = zeros(1,'d')
44
45
46 [feature,sub] = par_form.form_loop(feature_form,substrate_form,qx,qy,qz)
47
48 scatter_contrib = BornModel.BornModel(par_structure.structure_loop(qx,qy,qz,struc),feature,sub)
49
50 intensity = BornModel.calculate(scatter_contrib,qx,qy,qz)
51 plotting.two_Dim_with_z_slice(qx,qz,intensity,plot_points,maxqz)
52