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_edgeA, longer_edgeB, longuest_edgeC,parallel_phi, parallel_theta |
---|
10 | [DESCRIPTION] = <text> Calculates the form factor for a rectangular solid with uniform scattering length density. |
---|
11 | |
---|
12 | scale:Scale factor |
---|
13 | short_edgeA: Shortest edge of the parallelepiped [A] |
---|
14 | longer_edgeB: Longer edge of the parallelepiped [A] |
---|
15 | longuest_edgeC: Longuest edge of the parallelepiped [A] |
---|
16 | constrast: particle_sld - solvent_sld |
---|
17 | background:Incoherent Background [1/cm] |
---|
18 | </text> |
---|
19 | [FIXED]= <text>short_edgeA.width; longer_edgeB.width; longuest_edgeC.width;parallel_phi.width; parallel_theta.width</text> |
---|
20 | [ORIENTATION_PARAMS]= <text>parallel_phi; parallel_theta; parallel_phi.width; parallel_theta.width</text> |
---|
21 | |
---|
22 | |
---|
23 | **/ |
---|
24 | typedef struct { |
---|
25 | /// Scale factor |
---|
26 | // [DEFAULT]=scale=1.0 |
---|
27 | double scale; |
---|
28 | /// Shortest edge of the parallelepiped [A] |
---|
29 | // [DEFAULT]=short_edgeA=35 [A] |
---|
30 | double short_edgeA; |
---|
31 | /// Longer edge of the parallelepiped [A] |
---|
32 | // [DEFAULT]=longer_edgeB=75 [A] |
---|
33 | double longer_edgeB; |
---|
34 | /// Longuest edge of the parallelepiped [A] |
---|
35 | // [DEFAULT]=longuest_edgeC=400 [A] |
---|
36 | double longuest_edgeC; |
---|
37 | /// Contrast [1/A²] |
---|
38 | // [DEFAULT]=contrast=5.3e-6 [1/A²] |
---|
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=1.0 [rad] |
---|
45 | double parallel_theta; |
---|
46 | /// Orientation of the parallelepiped in the plane of the detector [rad] |
---|
47 | // [DEFAULT]=parallel_phi=1.0 [rad] |
---|
48 | double parallel_phi; |
---|
49 | |
---|
50 | |
---|
51 | } ParallelepipedParameters; |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | /// 1D scattering function |
---|
56 | double parallelepiped_analytical_1D(ParallelepipedParameters *pars, double q); |
---|
57 | |
---|
58 | /// 2D scattering function |
---|
59 | double parallelepiped_analytical_2D(ParallelepipedParameters *pars, double q, double phi); |
---|
60 | double parallelepiped_analytical_2DXY(ParallelepipedParameters *pars, double qx, double qy); |
---|
61 | double parallelepiped_analytical_2D_scaled(ParallelepipedParameters *pars, double q, double q_x, double q_y); |
---|
62 | |
---|
63 | #endif |
---|