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