source: sasview/sansmodels/src/sans/models/c_extensions/spheresld.h @ 830622f

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 830622f was 7a8faf8, checked in by Jae Cho <jhjcho@…>, 13 years ago

Added polydispersion in a couple of params in spheresldmodel

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