1 | #if !defined(capcyl_h) |
---|
2 | #define capcyl_h |
---|
3 | |
---|
4 | /** |
---|
5 | * Structure definition for CappedCylinder parameters |
---|
6 | */ |
---|
7 | //[PYTHONCLASS] = CappedCylinderModel |
---|
8 | //[DISP_PARAMS] = rad_cyl,len_cyl,rad_cap,phi, theta |
---|
9 | //[DESCRIPTION] =<text>Calculates the scattering from a cylinder with spherical section end-caps. |
---|
10 | // That is, a sphereocylinder |
---|
11 | // with end caps that have a radius larger than |
---|
12 | // that of the cylinder and the center of the |
---|
13 | // end cap radius lies within the cylinder. |
---|
14 | // Note: As the length of cylinder -->0, |
---|
15 | // it becomes a ConvexLens. |
---|
16 | // It must be that rad_cyl <(=) rad_cap. |
---|
17 | // [Parameters]; |
---|
18 | // scale: volume fraction of spheres, |
---|
19 | // background:incoherent background, |
---|
20 | // rad_cyl: radius of the cylinder, |
---|
21 | // len_cyl: length of the cylinder, |
---|
22 | // rad_cap: radius of the semi-spherical cap, |
---|
23 | // sld_capcyl: SLD of the capped cylinder, |
---|
24 | // sld_solv: SLD of the solvent. |
---|
25 | // </text> |
---|
26 | //[FIXED]= rad_cyl.width;len_cyl;rad_cap;phi.width; theta.width |
---|
27 | //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text> |
---|
28 | |
---|
29 | typedef struct { |
---|
30 | /// Scale factor |
---|
31 | // [DEFAULT]=scale= 1.0 |
---|
32 | double scale; |
---|
33 | |
---|
34 | /// rad_cyl [A] |
---|
35 | // [DEFAULT]=rad_cyl=20.0 [A] |
---|
36 | double rad_cyl; |
---|
37 | |
---|
38 | /// length of the cylinder |
---|
39 | // [DEFAULT]=len_cyl=400.0 [A] |
---|
40 | double len_cyl; |
---|
41 | |
---|
42 | /// Radius of sphere [A] |
---|
43 | // [DEFAULT]=rad_cap=40.0 [A] |
---|
44 | double rad_cap; |
---|
45 | |
---|
46 | /// sld_capcyl [1/A^(2)] |
---|
47 | // [DEFAULT]=sld_capcyl= 1.0e-6 [1/A^(2)] |
---|
48 | double sld_capcyl; |
---|
49 | |
---|
50 | /// sld_solv [1/A^(2)] |
---|
51 | // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)] |
---|
52 | double sld_solv; |
---|
53 | |
---|
54 | /// Incoherent Background [1/cm] |
---|
55 | // [DEFAULT]=background=0.0 [1/cm] |
---|
56 | double background; |
---|
57 | |
---|
58 | /// Angle of the main axis against z-axis in detector plane [rad] |
---|
59 | // [DEFAULT]=theta=0.0 [rad] |
---|
60 | double theta; |
---|
61 | /// Azimuthal angle around z-axis in detector plane [rad] |
---|
62 | // [DEFAULT]=phi=0.0 [rad] |
---|
63 | double phi; |
---|
64 | |
---|
65 | } CapCylParameters; |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | /// 1D scattering function |
---|
70 | double capcyl_analytical_1D(CapCylParameters *pars, double q); |
---|
71 | |
---|
72 | /// 2D scattering function |
---|
73 | double capcyl_analytical_2D(CapCylParameters *pars, double q, double phi); |
---|
74 | double capcyl_analytical_2DXY(CapCylParameters *pars, double qx, double qy); |
---|
75 | double capcyl_analytical_2D_scaled(CapCylParameters *pars, double q, double q_x, double q_y); |
---|
76 | |
---|
77 | #endif |
---|