source: sasview/src/sas/models/include/spheresld.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.5 KB
Line 
1#if !defined(o_h)
2#define sphere_sld_h
3#include "parameters.hh"
4
5/**
6 * Structure definition for sphere parameters
7 */
8 //[PYTHONCLASS] = SphereSLDModel
9 //[DISP_PARAMS] = rad_core0, thick_inter0
10 //[DESCRIPTION] =<text>Calculate neutron reflectivity using the Parratt iterative formula
11 //                             Parameters:
12 //                             background:background
13 //                             scale: scale factor
14 //                             sld_core0: the SLD of the substrate
15 //                             sld_solv: the SLD of the incident medium
16 //                                     or superstrate
17 //                             sld_flatN: the SLD of the flat region of
18 //                                     the N'th layer
19 //                             thick_flatN: the thickness of the flat
20 //                                     region of the N'th layer
21 //                             func_interN: the function used to describe
22 //                                     the interface of the N'th layer
23 //                             nu_interN: the coefficient for the func_interN
24 //                             thick_interN: the thickness of the interface
25 //                                     of the N'th layer
26 //                             Note: the layer number starts to increase
27 //                                     from the bottom (substrate) to the top.
28 //             </text>
29 //[FIXED]=  <text>rad_core0.width; thick_inter0.width</text>
30 //[NON_FITTABLE_PARAMS]= <text>n_shells;func_inter0;func_inter1;func_inter2;func_inter3;func_inter4;func_inter5;func_inter5;func_inter7;func_inter8;func_inter9;func_inter10 </text>
31 //[ORIENTATION_PARAMS]= <text> </text>
32
33class SphereSLDModel{
34public:
35  // Model parameters
36  /// number of shells
37  //  [DEFAULT]=n_shells=1
38  Parameter n_shells;
39    /// Scale factor
40    //  [DEFAULT]=scale= 1.0
41  Parameter scale;
42    /// thick_inter0 [A]
43    //  [DEFAULT]=thick_inter0=50.0 [A]
44  Parameter thick_inter0;
45  /// func_inter0
46  //  [DEFAULT]=func_inter0= 0
47  Parameter func_inter0;
48  /// sld_core0 [1/A^(2)]
49  //  [DEFAULT]=sld_core0= 2.07e-6 [1/A^(2)]
50  Parameter sld_core0;
51  /// sld_solv [1/A^(2)]
52  //  [DEFAULT]=sld_solv= 1.0e-6 [1/A^(2)]
53  Parameter sld_solv;
54  /// Background
55  //  [DEFAULT]=background=0
56  Parameter background;
57
58    //  [DEFAULT]=sld_flat1=4.0e-06 [1/A^(2)]
59    Parameter sld_flat1;
60    //  [DEFAULT]=sld_flat2=3.5e-06 [1/A^(2)]
61    Parameter sld_flat2;
62    //  [DEFAULT]=sld_flat3=4.0e-06 [1/A^(2)]
63    Parameter sld_flat3;
64    //  [DEFAULT]=sld_flat4=3.5e-06 [1/A^(2)]
65    Parameter sld_flat4;
66    //  [DEFAULT]=sld_flat5=4.0e-06 [1/A^(2)]
67    Parameter sld_flat5;
68    //  [DEFAULT]=sld_flat6=3.5e-06 [1/A^(2)]
69    Parameter sld_flat6;
70    //  [DEFAULT]=sld_flat7=4.0e-06 [1/A^(2)]
71    Parameter sld_flat7;
72    //  [DEFAULT]=sld_flat8=3.5e-06 [1/A^(2)]
73    Parameter sld_flat8;
74    //  [DEFAULT]=sld_flat9=4.0e-06 [1/A^(2)]
75    Parameter sld_flat9;
76    //  [DEFAULT]=sld_flat10=3.5e-06 [1/A^(2)]
77    Parameter sld_flat10;
78
79    //  [DEFAULT]=thick_inter1=50.0 [A]
80    Parameter thick_inter1;
81    //  [DEFAULT]=thick_inter2=50.0 [A]
82    Parameter thick_inter2;
83    //  [DEFAULT]=thick_inter3=50.0 [A]
84    Parameter thick_inter3;
85    //  [DEFAULT]=thick_inter4=50.0 [A]
86    Parameter thick_inter4;
87    //  [DEFAULT]=thick_inter5=50.0 [A]
88    Parameter thick_inter5;
89    //  [DEFAULT]=thick_inter6=50.0 [A]
90    Parameter thick_inter6;
91    //  [DEFAULT]=thick_inter7=50.0 [A]
92    Parameter thick_inter7;
93    //  [DEFAULT]=thick_inter8=50.0 [A]
94    Parameter thick_inter8;
95    //  [DEFAULT]=thick_inter9=50.0 [A]
96    Parameter thick_inter9;
97    //  [DEFAULT]=thick_inter10=50.0 [A]
98    Parameter thick_inter10;
99
100    //  [DEFAULT]=thick_flat1=100 [A]
101    Parameter thick_flat1;
102    //  [DEFAULT]=thick_flat2=100 [A]
103    Parameter thick_flat2;
104    //  [DEFAULT]=thick_flat3=100 [A]
105    Parameter thick_flat3;
106    //  [DEFAULT]=thick_flat4=100 [A]
107    Parameter thick_flat4;
108    //  [DEFAULT]=thick_flat5=100 [A]
109    Parameter thick_flat5;
110    //  [DEFAULT]=thick_flat6=100 [A]
111    Parameter thick_flat6;
112    //  [DEFAULT]=thick_flat7=100 [A]
113    Parameter thick_flat7;
114    //  [DEFAULT]=thick_flat8=100 [A]
115    Parameter thick_flat8;
116    //  [DEFAULT]=thick_flat9=100 [A]
117    Parameter thick_flat9;
118    //  [DEFAULT]=thick_flat10=100 [A]
119    Parameter thick_flat10;
120
121    //  [DEFAULT]=func_inter1=0
122    Parameter func_inter1;
123    //  [DEFAULT]=func_inter2=0
124    Parameter func_inter2;
125    //  [DEFAULT]=func_inter3=0
126    Parameter func_inter3;
127    //  [DEFAULT]=func_inter4=0
128    Parameter func_inter4;
129    //  [DEFAULT]=func_inter5=0
130    Parameter func_inter5;
131    //  [DEFAULT]=func_inter6=0
132    Parameter func_inter6;
133    //  [DEFAULT]=func_inter7=0
134    Parameter func_inter7;
135    //  [DEFAULT]=func_inter8=0
136    Parameter func_inter8;
137    //  [DEFAULT]=func_inter9=0
138    Parameter func_inter9;
139    //  [DEFAULT]=func_inter10=0
140    Parameter func_inter10;
141
142    //  [DEFAULT]=nu_inter1=2.5
143    Parameter nu_inter1;
144    //  [DEFAULT]=nu_inter2=2.5
145    Parameter nu_inter2;
146    //  [DEFAULT]=nu_inter3=2.5
147    Parameter nu_inter3;
148    //  [DEFAULT]=nu_inter4=2.5
149    Parameter nu_inter4;
150    //  [DEFAULT]=nu_inter5=2.5
151    Parameter nu_inter5;
152    //  [DEFAULT]=nu_inter6=2.5
153    Parameter nu_inter6;
154    //  [DEFAULT]=nu_inter7=2.5
155    Parameter nu_inter7;
156    //  [DEFAULT]=nu_inter8=2.5
157    Parameter nu_inter8;
158    //  [DEFAULT]=nu_inter9=2.5
159    Parameter nu_inter9;
160    //  [DEFAULT]=nu_inter10=2.5
161    Parameter nu_inter10;
162
163    //  [DEFAULT]=npts_inter=35.0
164    Parameter npts_inter;
165    //  [DEFAULT]=nu_inter0=2.5
166    Parameter nu_inter0;
167    //  [DEFAULT]=rad_core0=50.0 [A]
168    Parameter rad_core0;
169
170  // Constructor
171  SphereSLDModel();
172
173  // Operators to get I(Q)
174  double operator()(double q);
175  double operator()(double qx, double qy);
176  double calculate_ER();
177  double calculate_VR();
178  double evaluate_rphi(double q, double phi);
179};
180
181
182#endif
Note: See TracBrowser for help on using the repository browser.