Changes in sasmodels/models/stacked_disks.py [b7e8b94:9802ab3] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stacked_disks.py
rb7e8b94 r9802ab3 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. jpg79 .. figure:: img/cylinder_angle_definition.png 80 80 81 81 Examples of the angles against the detector plane. … … 103 103 """ 104 104 105 from numpy import inf 105 from numpy import inf, sin, cos, pi 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, [ 0, inf], "volume", "Number of stacked layer/core/layer disks"],128 ["n_stacking", "", 1.0, [1, 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, [- 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"],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"], 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 # but should not matter here as so far all the tests are 1D not 2D 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) 155 158 tests = [ 156 159 # Accuracy tests based on content in test/utest_extra_models.py. 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 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 158 163 [{'thick_core': 10.0, 159 164 'thick_layer': 15.0, … … 186 191 [{'thick_core': 10.0, 187 192 '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, 188 206 'radius': 3000.0, 189 207 'n_stacking': 5, … … 228 246 'background': 0.001, 229 247 }, ([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 ], 230 261 231 262 [{'thick_core': 10.0,
Note: See TracChangeset
for help on using the changeset viewer.