Changes in sasmodels/models/cylinder.py [9802ab3:3330bb4] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.py
r9802ab3 r3330bb4 38 38 39 39 40 Numerical integration is simplified by a change of variable to $u = cos(\alpha)$ with 41 $sin(\alpha)=\sqrt{1-u^2}$. 40 Numerical integration is simplified by a change of variable to $u = cos(\alpha)$ with 41 $sin(\alpha)=\sqrt{1-u^2}$. 42 42 43 43 The output of the 1D scattering intensity function for randomly oriented … … 61 61 .. _cylinder-angle-definition: 62 62 63 .. figure:: img/cylinder_angle_definition. png63 .. figure:: img/cylinder_angle_definition.jpg 64 64 65 Definition of the $\theta$ and $\phi$ orientation angles for a cylinder relative 66 to the beam line coordinates, plus an indication of their orientation distributions 67 which are described as rotations about each of the perpendicular axes $\delta_1$ and $\delta_2$ 68 in the frame of the cylinder itself, which when $\theta = \phi = 0$ are parallel to the $Y$ and $X$ axes. 65 Definition of the angles for oriented cylinders. 69 66 70 .. figure:: img/cylinder_angle_projection.png 71 72 Examples for oriented cylinders. 73 74 The $\theta$ and $\phi$ parameters to orient the cylinder only appear in the model when fitting 2d data. 75 On introducing "Orientational Distribution" in the angles, "distribution of theta" and "distribution of phi" parameters will 76 appear. These are actually rotations about the axes $\delta_1$ and $\delta_2$ of the cylinder, which when $\theta = \phi = 0$ are parallel 77 to the $Y$ and $X$ axes of the instrument respectively. Some experimentation may be required to understand the 2d patterns fully. 78 (Earlier implementations had numerical integration issues in some circumstances when orientation distributions passed through 90 degrees, such 79 situations, with very broad distributions, should still be approached with care.) 67 The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data. 80 68 81 69 Validation … … 135 123 ["length", "Ang", 400, [0, inf], "volume", 136 124 "Cylinder length"], 137 ["theta", "degrees", 60, [- 360, 360], "orientation",138 " cylinder axis to beam angle"],139 ["phi", "degrees", 60, [-360, 360], "orientation",140 " rotation about beam"],125 ["theta", "degrees", 60, [-inf, inf], "orientation", 126 "latitude"], 127 ["phi", "degrees", 60, [-inf, inf], "orientation", 128 "longitude"], 141 129 ] 142 130 … … 164 152 tests = [[{}, 0.2, 0.042761386790780453], 165 153 [{}, [0.2], [0.042761386790780453]], 166 # new coords 154 # new coords 167 155 [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852], 168 156 [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]],
Note: See TracChangeset
for help on using the changeset viewer.