source: sasview/sansmodels/src/sans/models/c_extensions/cylinder.h @ 92320e5

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 92320e5 was 92320e5, checked in by Gervaise Alina <gervyh@…>, 16 years ago

descrption o cylinder

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#if !defined(cylinder_h)
2#define cylinder_h
3#include string
4/** Structure definition for cylinder parameters
5 * [PYTHONCLASS] = CylinderModel
6 * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi
7   [DESCRIPTION] = <text>P(q,alpha)= scale/V*f(q)^(2)+bkg
8                                                f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2))/[qLcos(alpha/2)]*
9                                                J1(qRsin(alpha/2))/[qRsin(alpha)]
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 cylinder and the q-vector
15                                                for 1D:the ouput is P(q)=scale/V*integral from pi/2 to zero of f(q)^(2)*
16                                                sin(alpha)*dalpha+ bkg
17                                        </text>
18       
19 **/
20typedef struct {
21    /// Scale factor
22    //  [DEFAULT]=scale=1.0
23    double scale;
24    /// Radius of the cylinder [A]
25    //  [DEFAULT]=radius=20.0 A
26    double radius;
27    /// Length of the cylinder [A]
28    //  [DEFAULT]=length=400.0 A
29    double length;
30    /// Contrast [A-2]
31    //  [DEFAULT]=contrast=3.0e-6 A-2
32    double contrast;
33        /// Incoherent Background (cm-1) 0.000
34        //  [DEFAULT]=background=0 cm-1
35        double background;
36    /// Orientation of the cylinder axis w/respect incoming beam [rad]
37    //  [DEFAULT]=cyl_theta=1.0 rad
38    double cyl_theta;
39    /// Orientation of the cylinder in the plane of the detector [rad]
40    //  [DEFAULT]=cyl_phi=1.0 rad
41    double cyl_phi;
42       
43} CylinderParameters;
44
45
46
47/// 1D scattering function
48double cylinder_analytical_1D(CylinderParameters *pars, double q);
49
50/// 2D scattering function
51double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi);
52double cylinder_analytical_2DXY(CylinderParameters *pars, double qx, double qy);
53double cylinder_analytical_2D_scaled(CylinderParameters *pars, double q, double q_x, double q_y);
54
55#endif
Note: See TracBrowser for help on using the repository browser.