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

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 d760c0a was 4628e31, checked in by Jae Cho <jhjcho@…>, 14 years ago

changed the unit of angles into degrees

  • Property mode set to 100644
File size: 2.0 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> f(q)= 2*(sldCyl - sldSolv)*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>
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>
22
23
24 **/
25typedef struct {
26    /// Scale factor
27    //  [DEFAULT]=scale=1.0
28    double scale;
29    /// Radius of the cylinder [A]
30    //  [DEFAULT]=radius=20.0 [A]
31    double radius;
32    /// Length of the cylinder [A]
33    //  [DEFAULT]=length=400.0 [A]
34    double length;
35    /// Contrast [1/A^(2)]
36    //  [DEFAULT]=sldCyl=4.0e-6 [1/A^(2)]
37    double sldCyl;
38    /// sldCyl [1/A^(2)]
39    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)]
40    double sldSolv;
41        /// Incoherent Background [1/cm] 0.00
42        //  [DEFAULT]=background=0.0 [1/cm]
43        double background;
44    /// Orientation of the cylinder axis w/respect incoming beam [deg]
45    //  [DEFAULT]=cyl_theta=60.0 [deg]
46    double cyl_theta;
47    /// Orientation of the cylinder in the plane of the detector [deg]
48    //  [DEFAULT]=cyl_phi=60.0 [deg]
49    double cyl_phi;
50
51} CylinderParameters;
52
53
54
55/// 1D scattering function
56double cylinder_analytical_1D(CylinderParameters *pars, double q);
57
58/// 2D scattering function
59double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi);
60double cylinder_analytical_2DXY(CylinderParameters *pars, double qx, double qy);
61double cylinder_analytical_2D_scaled(CylinderParameters *pars, double q, double q_x, double q_y);
62
63#endif
Note: See TracBrowser for help on using the repository browser.