1 | #if !defined(cylinder_h) |
---|
2 | #define cylinder_h |
---|
3 | /** Structure definition for cylinder parameters |
---|
4 | * [PYTHONCLASS] = CylinderModel |
---|
5 | * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi |
---|
6 | [DESCRIPTION] = <text>P(q,alpha)= scale/V*f(q)^(2)+bkg |
---|
7 | f(q)= 2*(scatter_sld - solvent_sld)*V |
---|
8 | *sin(qLcos(alpha/2))/[qLcos(alpha/2)] |
---|
9 | *J1(qRsin(alpha/2))/[qRsin(alpha)] |
---|
10 | V: Volume of the cylinder |
---|
11 | R: Radius of the cylinder |
---|
12 | L: Length of the cylinder |
---|
13 | J1: The bessel function |
---|
14 | alpha: angle betweenthe axis of the cylinder |
---|
15 | and the q-vector for 1D:the ouput is |
---|
16 | P(q)=scale/V*integral from pi/2 to zero of |
---|
17 | f(q)^(2)*sin(alpha)*dalpha+ bkg |
---|
18 | </text> |
---|
19 | [FIXED]= <text>cyl_phi.width; cyl_theta.width; length.width;radius.width</text> |
---|
20 | [ORIENTATION_PARAMS]= <text>cyl_phi; cyl_theta; cyl_phi.width; cyl_theta.width</text> |
---|
21 | |
---|
22 | |
---|
23 | **/ |
---|
24 | typedef struct { |
---|
25 | /// Scale factor |
---|
26 | // [DEFAULT]=scale=1.0 |
---|
27 | double scale; |
---|
28 | /// Radius of the cylinder [Å] |
---|
29 | // [DEFAULT]=radius=20.0 [Å] |
---|
30 | double radius; |
---|
31 | /// Length of the cylinder [Å] |
---|
32 | // [DEFAULT]=length=400.0 [Å] |
---|
33 | double length; |
---|
34 | /// Contrast [1/Ų] |
---|
35 | // [DEFAULT]=contrast=3.0e-6 [1/Ų] |
---|
36 | double contrast; |
---|
37 | /// Incoherent Background [1/cm] 0.00 |
---|
38 | // [DEFAULT]=background=0.0 [1/cm] |
---|
39 | double background; |
---|
40 | /// Orientation of the cylinder axis w/respect incoming beam [rad] |
---|
41 | // [DEFAULT]=cyl_theta=1.0 [rad] |
---|
42 | double cyl_theta; |
---|
43 | /// Orientation of the cylinder in the plane of the detector [rad] |
---|
44 | // [DEFAULT]=cyl_phi=1.0 [rad] |
---|
45 | double cyl_phi; |
---|
46 | |
---|
47 | } CylinderParameters; |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | /// 1D scattering function |
---|
52 | double cylinder_analytical_1D(CylinderParameters *pars, double q); |
---|
53 | |
---|
54 | /// 2D scattering function |
---|
55 | double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi); |
---|
56 | double cylinder_analytical_2DXY(CylinderParameters *pars, double qx, double qy); |
---|
57 | double cylinder_analytical_2D_scaled(CylinderParameters *pars, double q, double q_x, double q_y); |
---|
58 | |
---|
59 | #endif |
---|