source: sasview/sansmodels/include/cylinder.h @ 6057915

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 6057915 was 6319646, checked in by Jae Cho <jhjcho@…>, 13 years ago

new includes for scale fix for P*S

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#if !defined(cylinder_h)
2#define cylinder_h
3#include "parameters.hh"
4
5/** Structure definition for cylinder parameters
6 * [PYTHONCLASS] = CylinderModel
7 * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi
8   [DESCRIPTION] = <text> f(q)= 2*(sldCyl - sldSolv)*V*sin(qLcos(alpha/2))
9                                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)]
10
11                P(q,alpha)= scale/V*f(q)^(2)+bkg
12                V: Volume of the cylinder
13                R: Radius of the cylinder
14                L: Length of the cylinder
15                J1: The bessel function
16                alpha: angle betweenthe axis of the
17                cylinder and the q-vector for 1D
18                :the ouput is P(q)=scale/V*integral
19                from pi/2 to zero of...
20                f(q)^(2)*sin(alpha)*dalpha+ bkg
21                </text>
22        [FIXED]= <text>cyl_phi.width; cyl_theta.width; length.width;radius.width</text>
23        [ORIENTATION_PARAMS]= <text>cyl_phi; cyl_theta; cyl_phi.width; cyl_theta.width</text>
24
25
26 **/
27class CylinderModel{
28public:
29  // Model parameters
30
31  /// Scale factor
32  //  [DEFAULT]=scale=1.0
33  Parameter scale;
34
35  /// Radius of the cylinder [A]
36  //  [DEFAULT]=radius=20.0 [A]
37  Parameter radius;
38
39  /// Length of the cylinder [A]
40  //  [DEFAULT]=length=400.0 [A]
41  Parameter length;
42
43  /// Contrast [1/A^(2)]
44  //  [DEFAULT]=sldCyl=4.0e-6 [1/A^(2)]
45  Parameter sldCyl;
46
47  /// sldCyl [1/A^(2)]
48  //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)]
49  Parameter sldSolv;
50
51  /// Incoherent Background [1/cm] 0.00
52  //  [DEFAULT]=background=0.0 [1/cm]
53  Parameter background;
54
55  /// Orientation of the cylinder axis w/respect incoming beam [deg]
56  //  [DEFAULT]=cyl_theta=60.0 [deg]
57  Parameter cyl_theta;
58
59  /// Orientation of the cylinder in the plane of the detector [deg]
60  //  [DEFAULT]=cyl_phi=60.0 [deg]
61  Parameter cyl_phi;
62
63  // Constructor
64  CylinderModel();
65
66  // Operators to get I(Q)
67  double operator()(double q);
68  double operator()(double qx, double qy);
69  double calculate_ER();
70  double calculate_VR();
71  double evaluate_rphi(double q, double phi);
72};
73
74#endif
Note: See TracBrowser for help on using the repository browser.