source: sasview/sansmodels/include/corefourshell.h @ cb6a2b7

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 cb6a2b7 was 318b5bbb, checked in by Jae Cho <jhjcho@…>, 12 years ago

Added polarization and magnetic stuffs

  • Property mode set to 100644
File size: 4.9 KB
Line 
1#if !defined(corefourshell_h)
2#define corefourshell_h
3#include "parameters.hh"
4
5/**
6 * Structure definition for sphere parameters
7 */
8//[PYTHONCLASS] = CoreFourShellModel
9//[DISP_PARAMS] = rad_core0, thick_shell1,thick_shell2,thick_shell3,thick_shell4
10//[DESCRIPTION] =<text> Calculates the scattering intensity from a core-4 shell structure.
11//                      scale = scale factor * volume fraction
12//                              rad_core0: the radius of the core
13//                              sld_core0: the SLD of the core
14//                              thick_shelli: the thickness of the i'th shell from the core
15//                              sld_shelli: the SLD of the i'th shell from the core
16//                              sld_solv: the SLD of the solvent
17//                              background: incoherent background
18//              </text>
19//[FIXED]=<text>  thick_shell4.width; thick_shell1.width;thick_shell2.width;thick_shell3.width;rad_core0.width </text>
20//[ORIENTATION_PARAMS]= <text> M0_sld_shell4; M_theta_shell4; M_phi_shell4;M0_sld_shell3; M_theta_shell3; M_phi_shell3; M0_sld_shell2; M_theta_shell2; M_phi_shell2;M0_sld_shell1; M_theta_shell1; M_phi_shell1; M0_sld_core0; M_theta_core0; M_phi_core0;M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text>
21//[MAGNETIC_PARAMS]= <text>  M0_sld_shell4; M_theta_shell4; M_phi_shell4;M0_sld_shell3; M_theta_shell3; M_phi_shell3;M0_sld_shell2; M_theta_shell2; M_phi_shell2;M0_sld_shell1; M_theta_shell1; M_phi_shell1; M0_sld_core0; M_theta_core0; M_phi_core0; M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text>
22
23
24class CoreFourShellModel{
25public:
26  // Model parameters
27  /// Scale factor
28  //  [DEFAULT]=scale= 1.0
29  Parameter scale;
30
31  /// Radius of the core0 [A]
32  //  [DEFAULT]=rad_core0=60. [A]
33  Parameter rad_core0;
34
35  /// sld of core0 [1/A^(2)]
36  //  [DEFAULT]=sld_core0= 6.4e-6 [1/A^(2)]
37  Parameter sld_core0;
38
39  /// thickness of the shell1 [A]
40  //  [DEFAULT]=thick_shell1=10.0 [A]
41  Parameter thick_shell1;
42
43  ///  sld of shell1 [1/A^(2)]
44  //  [DEFAULT]=sld_shell1= 1.0e-6 [1/A^(2)]
45  Parameter sld_shell1;
46
47  ///  thickness of the shell2 [A]
48  //  [DEFAULT]=thick_shell2=10.0 [A]
49  Parameter thick_shell2;
50
51  /// sld of shell2 [1/A^(2)]
52  //  [DEFAULT]=sld_shell2= 2.0e-6 [1/A^(2)]
53  Parameter sld_shell2;
54
55  /// thickness of the shell3 [A]
56  //  [DEFAULT]=thick_shell3=10.0 [A]
57  Parameter thick_shell3;
58
59  ///  sld of shell3 [1/A^(2)]
60  //  [DEFAULT]=sld_shell3= 3.0e-6 [1/A^(2)]
61  Parameter sld_shell3;
62
63  ///  thickness of the shell4 [A]
64  //  [DEFAULT]=thick_shell4=10.0 [A]
65  Parameter thick_shell4;
66
67  /// sld of shell4 [1/A^(2)]
68  //  [DEFAULT]=sld_shell4= 4.0e-6 [1/A^(2)]
69  Parameter sld_shell4;
70
71  /// sld_solv[1/A^(2)]
72  //  [DEFAULT]=sld_solv= 6.4e-6 [1/A^(2)]
73  Parameter sld_solv;
74
75  /// Incoherent Background [1/cm]
76  //  [DEFAULT]=background=0.001 [1/cm]
77  Parameter background;
78
79  /// M0_sld_shell1
80  //  [DEFAULT]=M0_sld_shell1=0.0e-6 [1/A^(2)]
81  Parameter M0_sld_shell1;
82
83  /// M_theta_shell1
84  //  [DEFAULT]=M_theta_shell1=0.0 [deg]
85  Parameter M_theta_shell1;
86
87  /// M_phi_shell1
88  //  [DEFAULT]=M_phi_shell1=0.0 [deg]
89  Parameter M_phi_shell1;
90
91  /// M0_sld_shell2
92  //  [DEFAULT]=M0_sld_shell2=0.0e-6 [1/A^(2)]
93  Parameter M0_sld_shell2;
94
95  /// M_theta_shell2
96  //  [DEFAULT]=M_theta_shell2=0.0 [deg]
97  Parameter M_theta_shell2;
98
99  /// M_phi_shell2
100  //  [DEFAULT]=M_phi_shell2=0.0 [deg]
101  Parameter M_phi_shell2;
102
103  /// M0_sld_shell3
104  //  [DEFAULT]=M0_sld_shell3=0.0e-6 [1/A^(2)]
105  Parameter M0_sld_shell3;
106
107  /// M_theta_shell3
108  //  [DEFAULT]=M_theta_shell3=0.0 [deg]
109  Parameter M_theta_shell3;
110
111  /// M_phi_shell3
112  //  [DEFAULT]=M_phi_shell3=0.0 [deg]
113  Parameter M_phi_shell3;
114
115  /// M0_sld_shell4
116  //  [DEFAULT]=M0_sld_shell4=0.0e-6 [1/A^(2)]
117  Parameter M0_sld_shell4;
118
119  /// M_theta_shell4
120  //  [DEFAULT]=M_theta_shell4=0.0 [deg]
121  Parameter M_theta_shell4;
122
123  /// M_phi_shell4
124  //  [DEFAULT]=M_phi_shell4=0.0 [deg]
125  Parameter M_phi_shell4;
126
127  /// M0_sld_core0
128  //  [DEFAULT]=M0_sld_core0=0.0e-6 [1/A^(2)]
129  Parameter M0_sld_core0;
130
131  /// M_theta_core0
132  //  [DEFAULT]=M_theta_core0=0.0 [deg]
133  Parameter M_theta_core0;
134
135  /// M_phi_core0
136  //  [DEFAULT]=M_phi_core0=0.0 [deg]
137  Parameter M_phi_core0;
138
139  /// M0_sld_solv
140  //  [DEFAULT]=M0_sld_solv=0.0e-6 [1/A^(2)]
141  Parameter M0_sld_solv;
142
143  /// M_theta_solv
144  //  [DEFAULT]=M_theta_solv=0.0 [deg]
145  Parameter M_theta_solv;
146
147  /// M_phi_solv
148  //  [DEFAULT]=M_phi_solv=0.0 [deg]
149  Parameter M_phi_solv;
150
151  /// Up_frac_i
152  //  [DEFAULT]=Up_frac_i=0.5 [u/(u+d)]
153  Parameter Up_frac_i;
154
155  /// Up_frac_f
156  //  [DEFAULT]=Up_frac_f=0.5 [u/(u+d)]
157  Parameter Up_frac_f;
158
159  /// Up_theta
160  //  [DEFAULT]=Up_theta=0.0 [deg]
161  Parameter Up_theta;
162
163  // Constructor
164  CoreFourShellModel();
165
166  // Operators to get I(Q)
167  double operator()(double q);
168  double operator()(double qx, double qy);
169  double calculate_ER();
170  double calculate_VR();
171  double evaluate_rphi(double q, double phi);
172};
173
174#endif
Note: See TracBrowser for help on using the repository browser.