source: sasview/sansmodels/src/sans/models/c_extensions/refl.h @ 444c900e

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 444c900e was 0164899a, checked in by Jae Cho <jhjcho@…>, 14 years ago

new models and some bug fixes

  • Property mode set to 100644
File size: 4.6 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
6/**
7 * Structure definition for sphere parameters
8 */
9 //[PYTHONCLASS] = ReflModel
10 //[DISP_PARAMS] = thick_inter0
11 //[DESCRIPTION] =<text>Calculate neutron reflectivity using the Parratt iterative formula
12 //                             Parameters:
13 //                             background:background
14 //                             scale: scale factor
15 //                             sld_bottom0: the SLD of the substrate
16 //                             sld_medium: the SLD of the incident medium
17 //                                     or superstrate
18 //                             sld_flatN: the SLD of the flat region of
19 //                                     the N'th layer
20 //                             thick_flatN: the thickness of the flat
21 //                                     region of the N'th layer
22 //                             func_interN: the function used to describe
23 //                                     the interface of the N'th layer
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></text>
30 //[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>
31 //[ORIENTATION_PARAMS]= <text> </text>
32
33typedef struct {
34        /// number of layers
35        //  [DEFAULT]=n_layers=1
36        int n_layers;
37    /// Scale factor
38    //  [DEFAULT]=scale= 1.0
39        double scale;
40    /// thick_inter0 [A]
41    //  [DEFAULT]=thick_inter0=1.0 [A]
42        double thick_inter0;
43        ///     func_inter0
44        //  [DEFAULT]=func_inter0= 0
45        double func_inter0;
46        ///     sld_bottom0 [1/A^(2)]
47        //  [DEFAULT]=sld_bottom0= 2.07e-6 [1/A^(2)]
48        double sld_bottom0;
49        ///     sld_medium [1/A^(2)]
50        //  [DEFAULT]=sld_medium= 1.0e-6 [1/A^(2)]
51        double sld_medium;
52        /// Background
53        //  [DEFAULT]=background=0
54        double background;
55
56    //  [DEFAULT]=sld_flat1=4.0e-06 [1/A^(2)]
57    double sld_flat1;
58    //  [DEFAULT]=sld_flat2=3.5e-06 [1/A^(2)]
59    double sld_flat2;
60    //  [DEFAULT]=sld_flat3=4.0e-06 [1/A^(2)]
61    double sld_flat3;
62    //  [DEFAULT]=sld_flat4=3.5e-06 [1/A^(2)]
63    double sld_flat4;
64    //  [DEFAULT]=sld_flat5=4.0e-06 [1/A^(2)]
65    double sld_flat5;
66    //  [DEFAULT]=sld_flat6=3.5e-06 [1/A^(2)]
67    double sld_flat6;
68    //  [DEFAULT]=sld_flat7=4.0e-06 [1/A^(2)]
69    double sld_flat7;
70    //  [DEFAULT]=sld_flat8=3.5e-06 [1/A^(2)]
71    double sld_flat8;
72    //  [DEFAULT]=sld_flat9=4.0e-06 [1/A^(2)]
73    double sld_flat9;
74    //  [DEFAULT]=sld_flat10=3.5e-06 [1/A^(2)]
75    double sld_flat10;
76
77    //  [DEFAULT]=thick_inter1=1 [A]
78    double thick_inter1;
79    //  [DEFAULT]=thick_inter2=1 [A]
80    double thick_inter2;
81    //  [DEFAULT]=thick_inter3=1 [A]
82    double thick_inter3;
83    //  [DEFAULT]=thick_inter4=1 [A]
84    double thick_inter4;
85    //  [DEFAULT]=thick_inter5=1 [A]
86    double thick_inter5;
87    //  [DEFAULT]=thick_inter6=1 [A]
88    double thick_inter6;
89    //  [DEFAULT]=thick_inter7=1 [A]
90    double thick_inter7;
91    //  [DEFAULT]=thick_inter8=1 [A]
92    double thick_inter8;
93    //  [DEFAULT]=thick_inter9=1 [A]
94    double thick_inter9;
95    //  [DEFAULT]=thick_inter10=1 [A]
96    double thick_inter10;
97
98    //  [DEFAULT]=thick_flat1=10 [A]
99    double thick_flat1;
100    //  [DEFAULT]=thick_flat2=100 [A]
101    double thick_flat2;
102    //  [DEFAULT]=thick_flat3=100 [A]
103    double thick_flat3;
104    //  [DEFAULT]=thick_flat4=100 [A]
105    double thick_flat4;
106    //  [DEFAULT]=thick_flat5=100 [A]
107    double thick_flat5;
108    //  [DEFAULT]=thick_flat6=100 [A]
109    double thick_flat6;
110    //  [DEFAULT]=thick_flat7=100 [A]
111    double thick_flat7;
112    //  [DEFAULT]=thick_flat8=100 [A]
113    double thick_flat8;
114    //  [DEFAULT]=thick_flat9=100 [A]
115    double thick_flat9;
116    //  [DEFAULT]=thick_flat10=100 [A]
117    double thick_flat10;
118
119    //  [DEFAULT]=func_inter1=0
120    double func_inter1;
121    //  [DEFAULT]=func_inter2=0
122    double func_inter2;
123    //  [DEFAULT]=func_inter3=0
124    double func_inter3;
125    //  [DEFAULT]=func_inter4=0
126    double func_inter4;
127    //  [DEFAULT]=func_inter5=0
128    double func_inter5;
129    //  [DEFAULT]=func_inter6=0
130    double func_inter6;
131    //  [DEFAULT]=func_inter7=0
132    double func_inter7;
133    //  [DEFAULT]=func_inter8=0
134    double func_inter8;
135    //  [DEFAULT]=func_inter9=0
136    double func_inter9;
137    //  [DEFAULT]=func_inter10=0
138    double func_inter10;
139
140
141} ReflParameters;
142
143double re_kernel(double dq[], double q);
144
145/// 1D scattering function
146double refl_analytical_1D(ReflParameters *pars, double q);
147
148/// 2D scattering function
149double refl_analytical_2D(ReflParameters *pars, double q, double phi);
150double refl_analytical_2DXY(ReflParameters *pars, double qx, double qy);
151
152#endif
Note: See TracBrowser for help on using the repository browser.