source: sasview/sansmodels/src/sans/models/c_extensions/cylinder.h @ 19ef1e5

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 19ef1e5 was da3dae3, checked in by Gervaise Alina <gervyh@…>, 16 years ago

wrappergenerator modified

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