[8a48713] | 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 |
---|
[2cb89e7] | 9 | * [DISP_PARAMS] = short_a, long_b, longer_c,parallel_phi,parallel_psi, parallel_theta |
---|
| 10 | [DESCRIPTION] = <text> Form factor for a rectangular solid with uniform scattering length density. |
---|
[975ec8e] | 11 | |
---|
[8a48713] | 12 | scale:Scale factor |
---|
[2cb89e7] | 13 | short_a: length of short side of the parallelepiped [A] |
---|
| 14 | long_b: length of long side of the parallelepiped [A] |
---|
| 15 | longer_c: length of longer side of the parallelepiped [A] |
---|
| 16 | contrast: particle_sld - solvent_sld |
---|
[975ec8e] | 17 | background:Incoherent Background [1/cm] |
---|
[8a48713] | 18 | </text> |
---|
[2cb89e7] | 19 | [FIXED]= <text>short_a.width; long_b.width; longer_c.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text> |
---|
[975ec8e] | 20 | [ORIENTATION_PARAMS]= <text>parallel_phi;parallel_psi; parallel_theta; parallel_phi.width;parallel_psi.width; parallel_theta.width</text> |
---|
[8a48713] | 21 | |
---|
| 22 | |
---|
| 23 | **/ |
---|
| 24 | typedef struct { |
---|
| 25 | /// Scale factor |
---|
| 26 | // [DEFAULT]=scale=1.0 |
---|
| 27 | double scale; |
---|
[2cb89e7] | 28 | /// Length of short side of the parallelepiped [A] |
---|
| 29 | // [DEFAULT]=short_a=35 [A] |
---|
| 30 | double short_a; |
---|
| 31 | /// Length of long side edge of the parallelepiped [A] |
---|
| 32 | // [DEFAULT]=long_b=75 [A] |
---|
| 33 | double long_b; |
---|
| 34 | /// Length of longer side of the parallelepiped [A] |
---|
| 35 | // [DEFAULT]=longer_c=400 [A] |
---|
| 36 | double longer_c; |
---|
[8a48713] | 37 | /// Contrast [1/A²] |
---|
| 38 | // [DEFAULT]=contrast=5.3e-6 [1/A²] |
---|
| 39 | double contrast; |
---|
[975ec8e] | 40 | /// Incoherent Background [1/cm] |
---|
[8a48713] | 41 | // [DEFAULT]=background=0.0 [1/cm] |
---|
| 42 | double background; |
---|
| 43 | /// Orientation of the parallelepiped axis w/respect incoming beam [rad] |
---|
[975ec8e] | 44 | // [DEFAULT]=parallel_theta=0.0 [rad] |
---|
[8a48713] | 45 | double parallel_theta; |
---|
[975ec8e] | 46 | /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [rad] |
---|
| 47 | // [DEFAULT]=parallel_phi=0.0 [rad] |
---|
[8a48713] | 48 | double parallel_phi; |
---|
[975ec8e] | 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; |
---|
[8a48713] | 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 |
---|