1 | #if !defined(ellipsoid_h) |
---|
2 | #define ellipsoid_h |
---|
3 | #include "parameters.hh" |
---|
4 | |
---|
5 | /** |
---|
6 | * Structure definition for ellipsoid parameters |
---|
7 | * The ellipsoid has axes radius_b, radius_b, radius_a. |
---|
8 | * Ref: Jan Skov Pedersen, Advances in Colloid and Interface Science, 70 (1997) 171-210 |
---|
9 | */ |
---|
10 | //[PYTHONCLASS] = EllipsoidModel |
---|
11 | //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi |
---|
12 | //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(sld_ell |
---|
13 | // - sld_solvent)*V*[sin(q*r(Ra,Rb,alpha)) |
---|
14 | // -q*r*cos(qr(Ra,Rb,alpha))] |
---|
15 | // /[qr(Ra,Rb,alpha)]^(3)" |
---|
16 | // |
---|
17 | // r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2) |
---|
18 | // + Ra^(2)*(cos(alpha))^(2)]^(1/2) |
---|
19 | // |
---|
20 | // scatter_sld: SLD of the scatter |
---|
21 | // solvent_sld: SLD of the solvent |
---|
22 | // sldEll: SLD of ellipsoid |
---|
23 | // sldSolv: SLD of solvent |
---|
24 | // V: volune of the Eliipsoid |
---|
25 | // Ra: radius along the rotation axis |
---|
26 | // of the Ellipsoid |
---|
27 | // Rb: radius perpendicular to the |
---|
28 | // rotation axis of the ellipsoid |
---|
29 | // </text> |
---|
30 | //[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width; |
---|
31 | //radius_b.width; length.width; r_minor.width; |
---|
32 | //r_ratio.width</text> |
---|
33 | //[ORIENTATION_PARAMS]= axis_phi.width; axis_theta.width;axis_phi; axis_theta |
---|
34 | |
---|
35 | class EllipsoidModel{ |
---|
36 | public: |
---|
37 | // Model parameters |
---|
38 | /// Rotation axis radius_a [A] |
---|
39 | // [DEFAULT]=radius_a=20.0 [A] |
---|
40 | Parameter radius_a; |
---|
41 | |
---|
42 | /// Scale factor |
---|
43 | // [DEFAULT]=scale=1.0 |
---|
44 | Parameter scale; |
---|
45 | |
---|
46 | /// Radius_b [A] |
---|
47 | // [DEFAULT]=radius_b=400 [A] |
---|
48 | Parameter radius_b; |
---|
49 | |
---|
50 | /// sldEll [1/A^(2)] |
---|
51 | // [DEFAULT]=sldEll=4.0e-6 [1/A^(2)] |
---|
52 | Parameter sldEll; |
---|
53 | |
---|
54 | /// sld of solvent [1/A^(2)] |
---|
55 | // [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] |
---|
56 | Parameter sldSolv; |
---|
57 | |
---|
58 | /// Incoherent Background [1/cm] |
---|
59 | // [DEFAULT]=background=0 [1/cm] |
---|
60 | Parameter background; |
---|
61 | |
---|
62 | /// Orientation of the long axis of the ellipsoid w/respect incoming beam [deg] |
---|
63 | // [DEFAULT]=axis_theta=90.0 [deg] |
---|
64 | Parameter axis_theta; |
---|
65 | /// Orientation of the long axis of the ellipsoid in the plane of the detector [deg] |
---|
66 | // [DEFAULT]=axis_phi=0.0 [deg] |
---|
67 | Parameter axis_phi; |
---|
68 | |
---|
69 | // Constructor |
---|
70 | EllipsoidModel(); |
---|
71 | |
---|
72 | // Operators to get I(Q) |
---|
73 | double operator()(double q); |
---|
74 | double operator()(double qx, double qy); |
---|
75 | double calculate_ER(); |
---|
76 | double calculate_VR(); |
---|
77 | double evaluate_rphi(double q, double phi); |
---|
78 | }; |
---|
79 | |
---|
80 | |
---|
81 | #endif |
---|