source: sasview/sansmodels/src/sans/models/c_extensions/core_shell_cylinder.h @ 3fef0a8

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 3fef0a8 was 70faf5d, checked in by Jae Cho <jhjcho@…>, 15 years ago

changed notation of units

  • Property mode set to 100644
File size: 2.9 KB
Line 
1#if !defined(core_shell_cylinder_h)
2#define core_shell_cylinder_h
3
4/**
5 * Structure definition for core-shell cylinder parameters
6 */
7 //[PYTHONCLASS] = CoreShellCylinderModel
8 //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi
9 //[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg  Where:\n\
10 //      f(q)= 2(core_sld- solvant_sld)* Vc*sin[qLcos(alpha/2)]/\n\
11 //      [qLcos(alpha/2)]*J1(qRsin(alpha))/[qRsin(alpha)] +\n
12 //  2(shell_sld-solvent_sld)*Vs
13 //      *sin[q(L+T)cos(alpha/2)]/[[q(L+T)cos(alpha/2)]
14 //      *J1(q(R+T)sin(alpha))/q(R+T)sin(alpha)]
15 //                     alpha:is the angle between the axis of the cylinder
16 //          and the q-vector
17 //                     Vs: the volume of the outer shell
18 //                     Vc: the volume of the core
19 //                     L: the length of the core
20 //             shell_sld: the scattering length density of the shell
21 //                     solvent_sld: the scattering length density of the solvent
22 //                     bkg: the background
23 //                     T: the thickness
24 //             R+T: is the outer radius
25 //             L+2T: The total length of the outershell
26 //                     J1: the first order Bessel function
27 //             theta: axis_theta of the cylinder
28 //             phi: the axis_phi of the cylinder
29 //             </text>
30 //[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness_width</text>
31 //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width
32
33
34typedef struct {
35    /// Scale factor
36    //  [DEFAULT]=scale=1.0
37    double scale;
38
39    /// Core radius [Å]
40    //  [DEFAULT]=radius=20.0 [Å]
41    double radius;
42
43    /// Shell thickness [Å]
44    //  [DEFAULT]=thickness=10.0 [Å]
45    double thickness;
46
47    /// Core length [Å]
48    //  [DEFAULT]=length=400.0 [Å]
49    double length;
50
51    /// Core SLD [1/Ų]
52    //  [DEFAULT]=core_sld=1.0e-6 [1/Ų]
53    double core_sld;
54
55    /// Shell SLD [1/Ų]
56    //  [DEFAULT]=shell_sld=4.0e-6 [1/Ų]
57    double shell_sld;
58
59    /// Solvent SLD [1/Ų]
60    //  [DEFAULT]=solvent_sld=1.0e-6 [1/Ų]
61    double solvent_sld;
62
63        /// Incoherent Background [1/cm]
64        //  [DEFAULT]=background=0 [1/cm]
65        double background;
66
67    /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [rad]
68    //  [DEFAULT]=axis_theta=1.57 [rad]
69    double axis_theta;
70
71    /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [rad]
72    //  [DEFAULT]=axis_phi=0.0 [rad]
73    double axis_phi;
74
75} CoreShellCylinderParameters;
76
77
78
79/// 1D scattering function
80double core_shell_cylinder_analytical_1D(CoreShellCylinderParameters *pars, double q);
81
82/// 2D scattering function
83double core_shell_cylinder_analytical_2D(CoreShellCylinderParameters *pars, double q, double phi);
84double core_shell_cylinder_analytical_2DXY(CoreShellCylinderParameters *pars, double qx, double qy);
85double core_shell_cylinder_analytical_2D_scaled(CoreShellCylinderParameters *pars, double q, double q_x, double q_y);
86
87#endif
Note: See TracBrowser for help on using the repository browser.