source: sasview/sansmodels/src/sans/models/c_extensions/core_shell_cylinder.h @ 836fe6e

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 836fe6e was 836fe6e, checked in by Gervaise Alina <gervyh@…>, 15 years ago

c_model wrappergenerator modified…
self.fixed list added to model

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