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