source: sasview/src/sas/models/include/refl.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: 4.7 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_h
5#include "parameters.hh"
6
7/**
8 * Structure definition for sphere parameters
9 */
10 //[PYTHONCLASS] = ReflModel
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 //                             thick_interN: the thickness of the interface
26 //                                     of the N'th layer
27 //                             Note: the layer number starts to increase
28 //                                     from the bottom (substrate) to the top.
29 //             </text>
30 //[FIXED]=  <text></text>
31 //[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>
32 //[ORIENTATION_PARAMS]= <text> </text>
33
34class ReflModel{
35public:
36  // Model parameters
37  /// number of layers
38  //  [DEFAULT]=n_layers=1
39  Parameter n_layers;
40    /// Scale factor
41    //  [DEFAULT]=scale= 1.0
42  Parameter scale;
43    /// thick_inter0 [A]
44    //  [DEFAULT]=thick_inter0=1.0 [A]
45  Parameter thick_inter0;
46  /// func_inter0
47  //  [DEFAULT]=func_inter0= 0
48  Parameter func_inter0;
49  /// sld_bottom0 [1/A^(2)]
50  //  [DEFAULT]=sld_bottom0= 2.07e-6 [1/A^(2)]
51  Parameter sld_bottom0;
52  /// sld_medium [1/A^(2)]
53  //  [DEFAULT]=sld_medium= 1.0e-6 [1/A^(2)]
54  Parameter sld_medium;
55  /// Background
56  //  [DEFAULT]=background=0
57  Parameter background;
58
59    //  [DEFAULT]=sld_flat1=4.0e-06 [1/A^(2)]
60    Parameter sld_flat1;
61    //  [DEFAULT]=sld_flat2=3.5e-06 [1/A^(2)]
62    Parameter sld_flat2;
63    //  [DEFAULT]=sld_flat3=4.0e-06 [1/A^(2)]
64    Parameter sld_flat3;
65    //  [DEFAULT]=sld_flat4=3.5e-06 [1/A^(2)]
66    Parameter sld_flat4;
67    //  [DEFAULT]=sld_flat5=4.0e-06 [1/A^(2)]
68    Parameter sld_flat5;
69    //  [DEFAULT]=sld_flat6=3.5e-06 [1/A^(2)]
70    Parameter sld_flat6;
71    //  [DEFAULT]=sld_flat7=4.0e-06 [1/A^(2)]
72    Parameter sld_flat7;
73    //  [DEFAULT]=sld_flat8=3.5e-06 [1/A^(2)]
74    Parameter sld_flat8;
75    //  [DEFAULT]=sld_flat9=4.0e-06 [1/A^(2)]
76    Parameter sld_flat9;
77    //  [DEFAULT]=sld_flat10=3.5e-06 [1/A^(2)]
78    Parameter sld_flat10;
79
80    //  [DEFAULT]=thick_inter1=1 [A]
81    Parameter thick_inter1;
82    //  [DEFAULT]=thick_inter2=1 [A]
83    Parameter thick_inter2;
84    //  [DEFAULT]=thick_inter3=1 [A]
85    Parameter thick_inter3;
86    //  [DEFAULT]=thick_inter4=1 [A]
87    Parameter thick_inter4;
88    //  [DEFAULT]=thick_inter5=1 [A]
89    Parameter thick_inter5;
90    //  [DEFAULT]=thick_inter6=1 [A]
91    Parameter thick_inter6;
92    //  [DEFAULT]=thick_inter7=1 [A]
93    Parameter thick_inter7;
94    //  [DEFAULT]=thick_inter8=1 [A]
95    Parameter thick_inter8;
96    //  [DEFAULT]=thick_inter9=1 [A]
97    Parameter thick_inter9;
98    //  [DEFAULT]=thick_inter10=1 [A]
99    Parameter thick_inter10;
100
101    //  [DEFAULT]=thick_flat1=10 [A]
102    Parameter thick_flat1;
103    //  [DEFAULT]=thick_flat2=100 [A]
104    Parameter thick_flat2;
105    //  [DEFAULT]=thick_flat3=100 [A]
106    Parameter thick_flat3;
107    //  [DEFAULT]=thick_flat4=100 [A]
108    Parameter thick_flat4;
109    //  [DEFAULT]=thick_flat5=100 [A]
110    Parameter thick_flat5;
111    //  [DEFAULT]=thick_flat6=100 [A]
112    Parameter thick_flat6;
113    //  [DEFAULT]=thick_flat7=100 [A]
114    Parameter thick_flat7;
115    //  [DEFAULT]=thick_flat8=100 [A]
116    Parameter thick_flat8;
117    //  [DEFAULT]=thick_flat9=100 [A]
118    Parameter thick_flat9;
119    //  [DEFAULT]=thick_flat10=100 [A]
120    Parameter thick_flat10;
121
122    //  [DEFAULT]=func_inter1=0
123    Parameter func_inter1;
124    //  [DEFAULT]=func_inter2=0
125    Parameter func_inter2;
126    //  [DEFAULT]=func_inter3=0
127    Parameter func_inter3;
128    //  [DEFAULT]=func_inter4=0
129    Parameter func_inter4;
130    //  [DEFAULT]=func_inter5=0
131    Parameter func_inter5;
132    //  [DEFAULT]=func_inter6=0
133    Parameter func_inter6;
134    //  [DEFAULT]=func_inter7=0
135    Parameter func_inter7;
136    //  [DEFAULT]=func_inter8=0
137    Parameter func_inter8;
138    //  [DEFAULT]=func_inter9=0
139    Parameter func_inter9;
140    //  [DEFAULT]=func_inter10=0
141    Parameter func_inter10;
142
143
144  // Constructor
145  ReflModel();
146
147  // Operators to get I(Q)
148  double operator()(double q);
149  double operator()(double qx, double qy);
150  double calculate_ER();
151  double calculate_VR();
152  double evaluate_rphi(double q, double phi);
153};
154
155#endif
Note: See TracBrowser for help on using the repository browser.