[5068697] | 1 | /* |
---|
| 2 | TODO: Add 2D model |
---|
| 3 | */ |
---|
| 4 | |
---|
| 5 | #if !defined(flexible_cylinder_h) |
---|
| 6 | #define flexible_cylinder_h |
---|
| 7 | /** Structure definition for Flexible cylinder parameters |
---|
| 8 | * [PYTHONCLASS] = FlexibleCylinderModel |
---|
| 9 | * [DISP_PARAMS] = length, radius, axis_theta, axis_phi |
---|
| 10 | [DESCRIPTION] = <text> Note : scale and contrast are both multiplicative factors in the model and are perfectly |
---|
| 11 | correlated. One or both of these parameters must be held fixed during model fitting. |
---|
| 12 | </text> |
---|
| 13 | [FIXED]= <text>length.width; radius.width; axis_theta.width; axis_phi.width</text> |
---|
| 14 | [ORIENTATION_PARAMS]= <text>axis_phi; axis_theta; axis_phi.width; axis_theta.width</text> |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | **/ |
---|
| 18 | typedef struct { |
---|
| 19 | /// Scale factor |
---|
| 20 | // [DEFAULT]=scale=1.0 |
---|
| 21 | double scale; |
---|
| 22 | /// Length of the flexible cylinder [A] |
---|
| 23 | // [DEFAULT]=length=1000 [A] |
---|
| 24 | double length; |
---|
| 25 | /// Kuhn length of the flexible cylinder [A] |
---|
| 26 | // [DEFAULT]=kuhn_length=100 [A] |
---|
| 27 | double kuhn_length; |
---|
| 28 | /// Radius of the flexible cylinder [A] |
---|
| 29 | // [DEFAULT]=radius=20.0 [A] |
---|
| 30 | double radius; |
---|
| 31 | /// Contrast [1/A²] |
---|
| 32 | // [DEFAULT]=contrast=5.3e-6 [1/A²] |
---|
| 33 | double contrast; |
---|
| 34 | /// Incoherent Background [1/cm] |
---|
| 35 | // [DEFAULT]=background=0.0001 [1/cm] |
---|
| 36 | double background; |
---|
| 37 | /// Orientation of the flexible cylinder axis w/respect incoming beam [rad] |
---|
| 38 | // [DEFAULT]=axis_theta=1.0 [rad] |
---|
| 39 | double axis_theta; |
---|
| 40 | /// Orientation of the flexible cylinder in the plane of the detector [rad] |
---|
| 41 | // [DEFAULT]=axis_phi=1.0 [rad] |
---|
| 42 | double axis_phi; |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | } FlexibleCylinderParameters; |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | /// 1D scattering function |
---|
| 50 | double flexible_cylinder_analytical_1D(FlexibleCylinderParameters *pars, double q); |
---|
| 51 | |
---|
| 52 | /// 2D scattering function |
---|
| 53 | double flexible_cylinder_analytical_2D(FlexibleCylinderParameters *pars, double q, double phi); |
---|
| 54 | double flexible_cylinder_analytical_2DXY(FlexibleCylinderParameters *pars, double qx, double qy); |
---|
| 55 | double flexible_cylinder_analytical_2D_scaled(FlexibleCylinderParameters *pars, double q, double q_x, double q_y); |
---|
| 56 | |
---|
| 57 | #endif |
---|