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