[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 |
---|
[1ed3834] | 6 | [DESCRIPTION] = <text> f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2)) |
---|
| 7 | /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] |
---|
| 8 | |
---|
| 9 | P(q,alpha)= scale/V*f(q)^(2)+bkg |
---|
| 10 | V: Volume of the cylinder |
---|
| 11 | R: Radius of the cylinder |
---|
| 12 | L: Length of the cylinder |
---|
| 13 | J1: The bessel function |
---|
| 14 | alpha: angle betweenthe axis of the |
---|
| 15 | cylinder and the q-vector for 1D |
---|
| 16 | :the ouput is P(q)=scale/V*integral |
---|
| 17 | from pi/2 to zero of... |
---|
| 18 | f(q)^(2)*sin(alpha)*dalpha+ bkg |
---|
| 19 | </text> |
---|
[25a608f5] | 20 | [FIXED]= <text>cyl_phi.width; cyl_theta.width; length.width;radius.width</text> |
---|
| 21 | [ORIENTATION_PARAMS]= <text>cyl_phi; cyl_theta; cyl_phi.width; cyl_theta.width</text> |
---|
[70faf5d] | 22 | |
---|
[25a608f5] | 23 | |
---|
[92320e5] | 24 | **/ |
---|
[ae3ce4e] | 25 | typedef struct { |
---|
[af03ddd] | 26 | /// Scale factor |
---|
[ae3ce4e] | 27 | // [DEFAULT]=scale=1.0 |
---|
| 28 | double scale; |
---|
[1ed3834] | 29 | /// Radius of the cylinder [A] |
---|
| 30 | // [DEFAULT]=radius=20.0 [A] |
---|
[ae3ce4e] | 31 | double radius; |
---|
[1ed3834] | 32 | /// Length of the cylinder [A] |
---|
| 33 | // [DEFAULT]=length=400.0 [A] |
---|
[ae3ce4e] | 34 | double length; |
---|
[27972c1d] | 35 | /// Contrast [1/A^(2)] |
---|
| 36 | // [DEFAULT]=contrast=3.0e-6 [1/A^(2)] |
---|
[ae3ce4e] | 37 | double contrast; |
---|
[70faf5d] | 38 | /// Incoherent Background [1/cm] 0.00 |
---|
| 39 | // [DEFAULT]=background=0.0 [1/cm] |
---|
[af03ddd] | 40 | double background; |
---|
[ae3ce4e] | 41 | /// Orientation of the cylinder axis w/respect incoming beam [rad] |
---|
[70faf5d] | 42 | // [DEFAULT]=cyl_theta=1.0 [rad] |
---|
[ae3ce4e] | 43 | double cyl_theta; |
---|
| 44 | /// Orientation of the cylinder in the plane of the detector [rad] |
---|
[70faf5d] | 45 | // [DEFAULT]=cyl_phi=1.0 [rad] |
---|
[af03ddd] | 46 | double cyl_phi; |
---|
[70faf5d] | 47 | |
---|
[ae3ce4e] | 48 | } CylinderParameters; |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | /// 1D scattering function |
---|
| 53 | double cylinder_analytical_1D(CylinderParameters *pars, double q); |
---|
| 54 | |
---|
| 55 | /// 2D scattering function |
---|
| 56 | double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi); |
---|
| 57 | double cylinder_analytical_2DXY(CylinderParameters *pars, double qx, double qy); |
---|
| 58 | double cylinder_analytical_2D_scaled(CylinderParameters *pars, double q, double q_x, double q_y); |
---|
| 59 | |
---|
| 60 | #endif |
---|