[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 |
---|
[70faf5d] | 11 | //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg |
---|
| 12 | // f(q)= 3*(scatter_sld- scatter_solvent)*V |
---|
| 13 | // *[sin(q*r(Ra,Rb,alpha))- q*r*cos(qr(Ra,Rb,alpha))] |
---|
| 14 | // /[qr(Ra,Rb,alpha)]^(3)" |
---|
| 15 | // r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2) |
---|
| 16 | // + Ra^(2)*(cos(alpha))^(2)]^(1/2) |
---|
| 17 | // scatter_sld: scattering length density of the scatter |
---|
| 18 | // solvent_sld: scattering length density of the solvent |
---|
| 19 | // V: volune of the Eliipsoid |
---|
| 20 | // Ra: radius along the rotation axis of the Ellipsoid |
---|
| 21 | // Rb: radius perpendicular to the rotation axis of the ellipsoid |
---|
| 22 | // </text> |
---|
[da3dae3] | 23 | //[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width; |
---|
| 24 | //radius_b.width; length.width; r_minor.width |
---|
| 25 | //, r_ratio.width</text> |
---|
[25a608f5] | 26 | //[ORIENTATION_PARAMS]= axis_phi.width; axis_theta.width;axis_phi; axis_theta |
---|
| 27 | |
---|
| 28 | |
---|
[ae3ce4e] | 29 | typedef struct { |
---|
[0f5bc9f] | 30 | /// Scale factor |
---|
[ae3ce4e] | 31 | // [DEFAULT]=scale=1.0 |
---|
| 32 | double scale; |
---|
[0f5bc9f] | 33 | |
---|
[70faf5d] | 34 | /// Rotation axis radius_a [Å] |
---|
| 35 | // [DEFAULT]=radius_a=20.0 [Å] |
---|
[ae3ce4e] | 36 | double radius_a; |
---|
[0f5bc9f] | 37 | |
---|
[70faf5d] | 38 | /// Radius_b [Å] |
---|
| 39 | // [DEFAULT]=radius_b=400 [Å] |
---|
[ae3ce4e] | 40 | double radius_b; |
---|
[0f5bc9f] | 41 | |
---|
[70faf5d] | 42 | /// Contrast [1/Ų] |
---|
| 43 | // [DEFAULT]=contrast=3.0e-6 [1/Ų] |
---|
[ae3ce4e] | 44 | double contrast; |
---|
[0f5bc9f] | 45 | |
---|
[70faf5d] | 46 | /// Incoherent Background [1/cm] |
---|
| 47 | // [DEFAULT]=background=0 [1/cm] |
---|
[0f5bc9f] | 48 | double background; |
---|
| 49 | |
---|
[ae3ce4e] | 50 | /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad] |
---|
[70faf5d] | 51 | // [DEFAULT]=axis_theta=1.57 [rad] |
---|
[ae3ce4e] | 52 | double axis_theta; |
---|
| 53 | /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad] |
---|
[70faf5d] | 54 | // [DEFAULT]=axis_phi=0.0 [rad] |
---|
[0f5bc9f] | 55 | double axis_phi; |
---|
[ae3ce4e] | 56 | } EllipsoidParameters; |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | /// 1D scattering function |
---|
| 61 | double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q); |
---|
| 62 | |
---|
| 63 | /// 2D scattering function |
---|
| 64 | double ellipsoid_analytical_2D(EllipsoidParameters *pars, double q, double phi); |
---|
| 65 | double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy); |
---|
| 66 | double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y); |
---|
| 67 | |
---|
| 68 | #endif |
---|