1 | /* |
---|
2 | TODO: Add 2D model |
---|
3 | */ |
---|
4 | |
---|
5 | #if !defined(parallelepiped_h) |
---|
6 | #define parallelepiped_h |
---|
7 | /** Structure definition for Parallelepiped parameters |
---|
8 | * [PYTHONCLASS] = ParallelepipedModel |
---|
9 | * [DISP_PARAMS] = short_a, short_b, long_c,parallel_phi,parallel_psi, parallel_theta |
---|
10 | [DESCRIPTION] = <text> Form factor for a rectangular solid with uniform scattering length density. |
---|
11 | |
---|
12 | scale:Scale factor |
---|
13 | short_a: length of short edge [A] |
---|
14 | short_b: length of another short edge [A] |
---|
15 | long_c: length of long edge of the parallelepiped [A] |
---|
16 | contrast: particle_sld - solvent_sld |
---|
17 | background:Incoherent Background [1/cm] |
---|
18 | </text> |
---|
19 | [FIXED]= <text>short_a.width; short_b.width; long_c.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text> |
---|
20 | [ORIENTATION_PARAMS]= <text>parallel_phi;parallel_psi; parallel_theta; parallel_phi.width;parallel_psi.width; parallel_theta.width</text> |
---|
21 | |
---|
22 | |
---|
23 | **/ |
---|
24 | typedef struct { |
---|
25 | /// Scale factor |
---|
26 | // [DEFAULT]=scale=1.0 |
---|
27 | double scale; |
---|
28 | /// Length of short edge of the parallelepiped [A] |
---|
29 | // [DEFAULT]=short_a=35 [A] |
---|
30 | double short_a; |
---|
31 | /// Length of short edge edge of the parallelepiped [A] |
---|
32 | // [DEFAULT]=short_b=75 [A] |
---|
33 | double short_b; |
---|
34 | /// Length of long edge of the parallelepiped [A] |
---|
35 | // [DEFAULT]=long_c=400 [A] |
---|
36 | double long_c; |
---|
37 | /// Contrast [1/A^(2)] |
---|
38 | // [DEFAULT]=contrast=53e-7 [1/A^(2)] |
---|
39 | double contrast; |
---|
40 | /// Incoherent Background [1/cm] |
---|
41 | // [DEFAULT]=background=0.0 [1/cm] |
---|
42 | double background; |
---|
43 | /// Orientation of the parallelepiped axis w/respect incoming beam [rad] |
---|
44 | // [DEFAULT]=parallel_theta=0.0 [rad] |
---|
45 | double parallel_theta; |
---|
46 | /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [rad] |
---|
47 | // [DEFAULT]=parallel_phi=0.0 [rad] |
---|
48 | double parallel_phi; |
---|
49 | /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [rad] |
---|
50 | // [DEFAULT]=parallel_psi=0.0 [rad] |
---|
51 | double parallel_psi; |
---|
52 | |
---|
53 | |
---|
54 | } ParallelepipedParameters; |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | /// 1D scattering function |
---|
59 | double parallelepiped_analytical_1D(ParallelepipedParameters *pars, double q); |
---|
60 | |
---|
61 | /// 2D scattering function |
---|
62 | double parallelepiped_analytical_2D(ParallelepipedParameters *pars, double q, double phi); |
---|
63 | double parallelepiped_analytical_2DXY(ParallelepipedParameters *pars, double qx, double qy); |
---|
64 | double parallelepiped_analytical_2D_scaled(ParallelepipedParameters *pars, double q, double q_x, double q_y); |
---|
65 | #endif |
---|