Changes in sasmodels/models/stacked_disks.py [9802ab3:b7e8b94] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stacked_disks.py
r9802ab3 rb7e8b94 58 58 and $\sigma_d$ = the Gaussian standard deviation of the d-spacing (*sigma_d*). 59 59 Note that $D\cos(\alpha)$ is the component of $D$ parallel to $q$ and the last 60 term in the equation above is effectively a Debye-Waller factor term. 60 term in the equation above is effectively a Debye-Waller factor term. 61 61 62 62 .. note:: … … 77 77 the axis of the cylinder using two angles $\theta$ and $\varphi$. 78 78 79 .. figure:: img/cylinder_angle_definition. png79 .. figure:: img/cylinder_angle_definition.jpg 80 80 81 81 Examples of the angles against the detector plane. … … 103 103 """ 104 104 105 from numpy import inf , sin, cos, pi105 from numpy import inf 106 106 107 107 name = "stacked_disks" … … 126 126 ["thick_layer", "Ang", 10.0, [0, inf], "volume", "Thickness of layer each side of core"], 127 127 ["radius", "Ang", 15.0, [0, inf], "volume", "Radius of the stacked disk"], 128 ["n_stacking", "", 1.0, [ 1, inf], "volume", "Number of stacked layer/core/layer disks"],128 ["n_stacking", "", 1.0, [0, inf], "volume", "Number of stacked layer/core/layer disks"], 129 129 ["sigma_d", "Ang", 0, [0, inf], "", "Sigma of nearest neighbor spacing"], 130 130 ["sld_core", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Core scattering length density"], 131 131 ["sld_layer", "1e-6/Ang^2", 0.0, [-inf, inf], "sld", "Layer scattering length density"], 132 132 ["sld_solvent", "1e-6/Ang^2", 5.0, [-inf, inf], "sld", "Solvent scattering length density"], 133 ["theta", "degrees", 0, [- 360, 360], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"],134 ["phi", "degrees", 0, [- 360, 360], "orientation", "Rotation about beam"],133 ["theta", "degrees", 0, [-inf, inf], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 134 ["phi", "degrees", 0, [-inf, inf], "orientation", "Orientation of the stacked disk in the plane of the detector"], 135 135 ] 136 136 # pylint: enable=bad-whitespace, line-too-long … … 152 152 # After redefinition of spherical coordinates - 153 153 # tests had in old coords theta=0, phi=0; new coords theta=90, phi=0 154 q = 0.1 155 # april 6 2017, rkh added a 2d unit test, assume correct! 156 qx = q*cos(pi/6.0) 157 qy = q*sin(pi/6.0) 154 # but should not matter here as so far all the tests are 1D not 2D 158 155 tests = [ 159 156 # Accuracy tests based on content in test/utest_extra_models.py. 160 # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB; 161 # for which alas q=0.001 values seem closer to n_stacked=1 not 5, 162 # changed assuming my 4.1 code OK, RKH 157 # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB; for which alas q=0.001 values seem closer to n_stacked=1 not 5, changed assuming my 4.1 code OK, RKH 163 158 [{'thick_core': 10.0, 164 159 'thick_layer': 15.0, … … 191 186 [{'thick_core': 10.0, 192 187 'thick_layer': 15.0, 193 'radius': 100.0,194 'n_stacking': 5,195 'sigma_d': 0.0,196 'sld_core': 4.0,197 'sld_layer': -0.4,198 'solvent_sd': 5.0,199 'theta': 90.0,200 'phi': 20.0,201 'scale': 0.01,202 'background': 0.001},203 (qx, qy), 0.0491167089952 ],204 [{'thick_core': 10.0,205 'thick_layer': 15.0,206 188 'radius': 3000.0, 207 189 'n_stacking': 5, … … 246 228 'background': 0.001, 247 229 }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 248 [{'thick_core': 10.0,249 'thick_layer': 15.0,250 'radius': 3000.0,251 'n_stacking': 1.0,252 'sigma_d': 0.0,253 'sld_core': 4.0,254 'sld_layer': -0.4,255 'solvent_sd': 5.0,256 'theta': 90.0,257 'phi': 20.0,258 'scale': 0.01,259 'background': 0.001,260 }, (qx, qy), 0.0341738733124 ],261 230 262 231 [{'thick_core': 10.0,
Note: See TracChangeset
for help on using the changeset viewer.