source: sasview/src/sas/models/include/onion.h @ 79492222

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 79492222 was 79492222, checked in by krzywon, 9 years ago

Changed the file and folder names to remove all SANS references.

  • Property mode set to 100644
File size: 5.9 KB
Line 
1#if !defined(o_h)
2#define onion_h
3#include "parameters.hh"
4
5/**
6 * Structure definition for sphere parameters
7 */
8 //[PYTHONCLASS] = OnionModel
9 //[DISP_PARAMS] = rad_core0, thick_shell1,thick_shell2,thick_shell3,thick_shell4, thick_shell5,thick_shell6,thick_shell7,thick_shell8,thick_shell9,thick_shell10
10 //[DESCRIPTION] =<text>Form factor of mutishells normalized by the volume. Here each shell is described
11 //                                              by an exponential function;
12 //                                                     I)
13 //                                                     For A_shell != 0,
14 //                                                     f(r) = B*exp(A_shell*(r-r_in)/thick_shell)+C
15 //                         where
16 //                                                             B=(sld_out-sld_in)/(exp(A_shell)-1)
17 //                                                             C=sld_in-B.
18 //                                                     Note that in the above case,
19 //                                                             the function becomes a linear function
20 //                                                             as A_shell --> 0+ or 0-.
21 //                                                     II)
22 //                                                     For the exact point of A_shell == 0,
23 //                                                     f(r) = sld_in ,i.e., it crosses over flat function
24 //                                                     Note that the 'sld_out' becaomes NULL in this case.
25 //
26 //                             background:background,
27 //                             rad_core0: radius of sphere(core)
28 //                             thick_shell#:the thickness of the shell#
29 //                             sld_core0: the SLD of the sphere
30 //                             sld_solv: the SLD of the solvent
31 //                             sld_shell: the SLD of the shell#
32 //                             A_shell#: the coefficient in the exponential function
33 //             </text>
34 //[FIXED]=  <text>rad_core0.width;thick_shell1.width;thick_shell2.width;thick_shell3.width;thick_shell4.width;thick_shell5.width;thick_shell6.width;thick_shell7.width;thick_shell8.width;thick_shell9.width;thick_shell10.width</text>
35 //[ORIENTATION_PARAMS]= <text> </text>
36
37class OnionModel{
38public:
39    // Model parameters
40    /// number of shells
41    //  [DEFAULT]=n_shells=1
42    Parameter n_shells;
43      /// Scale factor
44      //  [DEFAULT]=scale= 1.0
45    Parameter scale;
46      /// Radius of sphere [A]
47      //  [DEFAULT]=rad_core0=200.0 [A]
48    Parameter rad_core0;
49    /// sld_core [1/A^(2)]
50    //  [DEFAULT]=sld_core0= 1.0e-6 [1/A^(2)]
51    Parameter sld_core0;
52    /// sld_solv [1/A^(2)]
53    //  [DEFAULT]=sld_solv= 6.4e-6 [1/A^(2)]
54    Parameter sld_solv;
55    /// Incoherent Background [1/cm]
56    //  [DEFAULT]=background=0 [1/cm]
57    Parameter background;
58
59    //  [DEFAULT]=sld_out_shell1=2.0e-06 [1/A^(2)]
60    Parameter sld_out_shell1;
61    //  [DEFAULT]=sld_out_shell2=2.5e-06 [1/A^(2)]
62    Parameter sld_out_shell2;
63    //  [DEFAULT]=sld_out_shell3=3.0e-06 [1/A^(2)]
64    Parameter sld_out_shell3;
65    //  [DEFAULT]=sld_out_shell4=3.5e-06 [1/A^(2)]
66    Parameter sld_out_shell4;
67    //  [DEFAULT]=sld_out_shell5=4.0e-06 [1/A^(2)]
68    Parameter sld_out_shell5;
69    //  [DEFAULT]=sld_out_shell6=4.5e-06 [1/A^(2)]
70    Parameter sld_out_shell6;
71    //  [DEFAULT]=sld_out_shell7=5.0e-06 [1/A^(2)]
72    Parameter sld_out_shell7;
73    //  [DEFAULT]=sld_out_shell8=5.5e-06 [1/A^(2)]
74    Parameter sld_out_shell8;
75    //  [DEFAULT]=sld_out_shell9=6.0e-06 [1/A^(2)]
76    Parameter sld_out_shell9;
77    //  [DEFAULT]=sld_out_shell10=6.2e-06 [1/A^(2)]
78    Parameter sld_out_shell10;
79
80    //  [DEFAULT]=sld_in_shell1=1.7e-06 [1/A^(2)]
81    Parameter sld_in_shell1;
82    //  [DEFAULT]=sld_in_shell2=2.2e-06 [1/A^(2)]
83    Parameter sld_in_shell2;
84    //  [DEFAULT]=sld_in_shell3=2.7e-06 [1/A^(2)]
85    Parameter sld_in_shell3;
86    //  [DEFAULT]=sld_in_shell4=3.2e-06 [1/A^(2)]
87    Parameter sld_in_shell4;
88    //  [DEFAULT]=sld_in_shell5=3.7e-06 [1/A^(2)]
89    Parameter sld_in_shell5;
90    //  [DEFAULT]=sld_in_shell6=4.2e-06 [1/A^(2)]
91    Parameter sld_in_shell6;
92    //  [DEFAULT]=sld_in_shell7=4.7e-06 [1/A^(2)]
93    Parameter sld_in_shell7;
94    //  [DEFAULT]=sld_in_shell8=5.2e-06 [1/A^(2)]
95    Parameter sld_in_shell8;
96    //  [DEFAULT]=sld_in_shell9=5.7e-06 [1/A^(2)]
97    Parameter sld_in_shell9;
98    //  [DEFAULT]=sld_in_shell10=6.0e-06 [1/A^(2)]
99    Parameter sld_in_shell10;
100
101    //  [DEFAULT]=A_shell1=1.0
102    Parameter A_shell1;
103    //  [DEFAULT]=A_shell2=1.0
104    Parameter A_shell2;
105    //  [DEFAULT]=A_shell3=1.0
106    Parameter A_shell3;
107    //  [DEFAULT]=A_shell4=1.0
108    Parameter A_shell4;
109    //  [DEFAULT]=A_shell5=1.0
110    Parameter A_shell5;
111    //  [DEFAULT]=A_shell6=1.0
112    Parameter A_shell6;
113    //  [DEFAULT]=A_shell7=1.0
114    Parameter A_shell7;
115    //  [DEFAULT]=A_shell8=1.0
116    Parameter A_shell8;
117    //  [DEFAULT]=A_shell9=1.0
118    Parameter A_shell9;
119    //  [DEFAULT]=A_shell10=1.0
120    Parameter A_shell10;
121
122    //  [DEFAULT]=thick_shell1=50.0 [A]
123    Parameter thick_shell1;
124    //  [DEFAULT]=thick_shell2=50.0 [A]
125    Parameter thick_shell2;
126    //  [DEFAULT]=thick_shell3=50.0 [A]
127    Parameter thick_shell3;
128    //  [DEFAULT]=thick_shell4=50.0 [A]
129    Parameter thick_shell4;
130    //  [DEFAULT]=thick_shell5=50.0 [A]
131    Parameter thick_shell5;
132    //  [DEFAULT]=thick_shell6=50.0 [A]
133    Parameter thick_shell6;
134    //  [DEFAULT]=thick_shell7=50.0 [A]
135    Parameter thick_shell7;
136    //  [DEFAULT]=thick_shell8=50.0 [A]
137    Parameter thick_shell8;
138    //  [DEFAULT]=thick_shell9=50.0 [A]
139    Parameter thick_shell9;
140    //  [DEFAULT]=thick_shell10=50.0 [A]
141    Parameter thick_shell10;
142
143    //  [DEFAULT]=func_shell1=2
144    Parameter func_shell1;
145    //  [DEFAULT]=func_shell2=2
146    Parameter func_shell2;
147    //  [DEFAULT]=func_shell3=2
148    Parameter func_shell3;
149    //  [DEFAULT]=func_shell4=2
150    Parameter func_shell4;
151    //  [DEFAULT]=func_shell5=2
152    Parameter func_shell5;
153    //  [DEFAULT]=func_shell6=2
154    Parameter func_shell6;
155    //  [DEFAULT]=func_shell7=2
156    Parameter func_shell7;
157    //  [DEFAULT]=func_shell8=2
158    Parameter func_shell8;
159    //  [DEFAULT]=func_shell9=2
160    Parameter func_shell9;
161    //  [DEFAULT]=func_shell10=2
162    Parameter func_shell10;
163
164  // Constructor
165  OnionModel();
166
167  // Operators to get I(Q)
168  double operator()(double q);
169  double operator()(double qx, double qy);
170  double calculate_ER();
171  double calculate_VR();
172  double evaluate_rphi(double q, double phi);
173};
174
175#endif
Note: See TracBrowser for help on using the repository browser.