[ae3ce4e] | 1 | #if !defined(cylinder_h) |
---|
| 2 | #define cylinder_h |
---|
[af03ddd] | 3 | /** Structure definition for cylinder parameters |
---|
[ae3ce4e] | 4 | * [PYTHONCLASS] = CylinderModel |
---|
[af03ddd] | 5 | * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi |
---|
[4d3acb6] | 6 | [DESCRIPTION] = <text>P(q,alpha)= scale/V*f(q)^(2)+bkg |
---|
| 7 | f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2))/[qLcos(alpha/2)]* |
---|
| 8 | J1(qRsin(alpha/2))/[qRsin(alpha)] |
---|
| 9 | V: Volume of the cylinder |
---|
| 10 | R: Radius of the cylinder |
---|
| 11 | L: Length of the cylinder |
---|
| 12 | J1: The bessel function |
---|
| 13 | alpha: angle betweenthe axis of the cylinder and the q-vector |
---|
| 14 | for 1D:the ouput is P(q)=scale/V*integral from pi/2 to zero of f(q)^(2)* |
---|
| 15 | sin(alpha)*dalpha+ bkg |
---|
[96672c0] | 16 | </text> |
---|
[4e2f6ef8] | 17 | |
---|
[92320e5] | 18 | **/ |
---|
[ae3ce4e] | 19 | typedef struct { |
---|
[af03ddd] | 20 | /// Scale factor |
---|
[ae3ce4e] | 21 | // [DEFAULT]=scale=1.0 |
---|
| 22 | double scale; |
---|
| 23 | /// Radius of the cylinder [A] |
---|
[af03ddd] | 24 | // [DEFAULT]=radius=20.0 A |
---|
[ae3ce4e] | 25 | double radius; |
---|
| 26 | /// Length of the cylinder [A] |
---|
| 27 | // [DEFAULT]=length=400.0 A |
---|
| 28 | double length; |
---|
| 29 | /// Contrast [A-2] |
---|
| 30 | // [DEFAULT]=contrast=3.0e-6 A-2 |
---|
| 31 | double contrast; |
---|
| 32 | /// Incoherent Background (cm-1) 0.000 |
---|
| 33 | // [DEFAULT]=background=0 cm-1 |
---|
[af03ddd] | 34 | double background; |
---|
[ae3ce4e] | 35 | /// Orientation of the cylinder axis w/respect incoming beam [rad] |
---|
| 36 | // [DEFAULT]=cyl_theta=1.0 rad |
---|
| 37 | double cyl_theta; |
---|
| 38 | /// Orientation of the cylinder in the plane of the detector [rad] |
---|
| 39 | // [DEFAULT]=cyl_phi=1.0 rad |
---|
[af03ddd] | 40 | double cyl_phi; |
---|
[4e2f6ef8] | 41 | |
---|
[ae3ce4e] | 42 | } CylinderParameters; |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | /// 1D scattering function |
---|
| 47 | double cylinder_analytical_1D(CylinderParameters *pars, double q); |
---|
| 48 | |
---|
| 49 | /// 2D scattering function |
---|
| 50 | double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi); |
---|
| 51 | double cylinder_analytical_2DXY(CylinderParameters *pars, double qx, double qy); |
---|
| 52 | double cylinder_analytical_2D_scaled(CylinderParameters *pars, double q, double q_x, double q_y); |
---|
| 53 | |
---|
| 54 | #endif |
---|