[ae3ce4e] | 1 | #if !defined(core_shell_cylinder_h) |
---|
| 2 | #define core_shell_cylinder_h |
---|
| 3 | |
---|
[0f5bc9f] | 4 | /** |
---|
| 5 | * Structure definition for core-shell cylinder parameters |
---|
[ae3ce4e] | 6 | */ |
---|
| 7 | //[PYTHONCLASS] = CoreShellCylinderModel |
---|
[0f5bc9f] | 8 | //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi |
---|
[1ed3834] | 9 | //[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg, where: f(q)= 2(core_sld |
---|
| 10 | // - solvant_sld)* Vc*sin[qLcos(alpha/2)] |
---|
| 11 | // /[qLcos(alpha/2)]*J1(qRsin(alpha)) |
---|
| 12 | // /[qRsin(alpha)]+2(shell_sld-solvent_sld) |
---|
| 13 | // *Vs*sin[q(L+T)cos(alpha/2)][[q(L+T) |
---|
| 14 | // *cos(alpha/2)]*J1(q(R+T)sin(alpha)) |
---|
| 15 | // /q(R+T)sin(alpha)] |
---|
| 16 | // |
---|
| 17 | // alpha:is the angle between the axis of |
---|
| 18 | // the cylinder and the q-vector |
---|
[70faf5d] | 19 | // Vs: the volume of the outer shell |
---|
| 20 | // Vc: the volume of the core |
---|
| 21 | // L: the length of the core |
---|
[1ed3834] | 22 | // shell_sld: the scattering length density |
---|
| 23 | // of the shell |
---|
| 24 | // solvent_sld: the scattering length density |
---|
| 25 | // of the solvent |
---|
[70faf5d] | 26 | // bkg: the background |
---|
| 27 | // T: the thickness |
---|
| 28 | // R+T: is the outer radius |
---|
| 29 | // L+2T: The total length of the outershell |
---|
| 30 | // J1: the first order Bessel function |
---|
| 31 | // theta: axis_theta of the cylinder |
---|
[1ed3834] | 32 | // phi: the axis_phi of the cylinder... |
---|
[70faf5d] | 33 | // </text> |
---|
[836fe6e] | 34 | //[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness_width</text> |
---|
[70faf5d] | 35 | //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width |
---|
[25a608f5] | 36 | |
---|
[96672c0] | 37 | |
---|
[ae3ce4e] | 38 | typedef struct { |
---|
[0f5bc9f] | 39 | /// Scale factor |
---|
[ae3ce4e] | 40 | // [DEFAULT]=scale=1.0 |
---|
| 41 | double scale; |
---|
[0f5bc9f] | 42 | |
---|
[1ed3834] | 43 | /// Core radius [A] |
---|
| 44 | // [DEFAULT]=radius=20.0 [A] |
---|
[ae3ce4e] | 45 | double radius; |
---|
[0f5bc9f] | 46 | |
---|
[1ed3834] | 47 | /// Shell thickness [A] |
---|
| 48 | // [DEFAULT]=thickness=10.0 [A] |
---|
[ae3ce4e] | 49 | double thickness; |
---|
[0f5bc9f] | 50 | |
---|
[1ed3834] | 51 | /// Core length [A] |
---|
| 52 | // [DEFAULT]=length=400.0 [A] |
---|
[ae3ce4e] | 53 | double length; |
---|
[0f5bc9f] | 54 | |
---|
[1ed3834] | 55 | /// Core SLD [1/A²] |
---|
| 56 | // [DEFAULT]=core_sld=1.0e-6 [1/A²] |
---|
[ae3ce4e] | 57 | double core_sld; |
---|
[0f5bc9f] | 58 | |
---|
[1ed3834] | 59 | /// Shell SLD [1/A²] |
---|
| 60 | // [DEFAULT]=shell_sld=4.0e-6 [1/A²] |
---|
[ae3ce4e] | 61 | double shell_sld; |
---|
[0f5bc9f] | 62 | |
---|
[1ed3834] | 63 | /// Solvent SLD [1/A²] |
---|
| 64 | // [DEFAULT]=solvent_sld=1.0e-6 [1/A²] |
---|
[ae3ce4e] | 65 | double solvent_sld; |
---|
[0f5bc9f] | 66 | |
---|
[70faf5d] | 67 | /// Incoherent Background [1/cm] |
---|
| 68 | // [DEFAULT]=background=0 [1/cm] |
---|
[0f5bc9f] | 69 | double background; |
---|
| 70 | |
---|
[ae3ce4e] | 71 | /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [rad] |
---|
[70faf5d] | 72 | // [DEFAULT]=axis_theta=1.57 [rad] |
---|
[ae3ce4e] | 73 | double axis_theta; |
---|
[0f5bc9f] | 74 | |
---|
[ae3ce4e] | 75 | /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [rad] |
---|
[70faf5d] | 76 | // [DEFAULT]=axis_phi=0.0 [rad] |
---|
[0f5bc9f] | 77 | double axis_phi; |
---|
| 78 | |
---|
[ae3ce4e] | 79 | } CoreShellCylinderParameters; |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | /// 1D scattering function |
---|
| 84 | double core_shell_cylinder_analytical_1D(CoreShellCylinderParameters *pars, double q); |
---|
| 85 | |
---|
| 86 | /// 2D scattering function |
---|
| 87 | double core_shell_cylinder_analytical_2D(CoreShellCylinderParameters *pars, double q, double phi); |
---|
| 88 | double core_shell_cylinder_analytical_2DXY(CoreShellCylinderParameters *pars, double qx, double qy); |
---|
| 89 | double core_shell_cylinder_analytical_2D_scaled(CoreShellCylinderParameters *pars, double q, double q_x, double q_y); |
---|
| 90 | |
---|
| 91 | #endif |
---|