Changes in sasmodels/models/cylinder.py [3330bb4:9802ab3] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.py
r3330bb4 r9802ab3 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. jpg63 .. figure:: img/cylinder_angle_definition.png 64 64 65 Definition of the angles for oriented cylinders. 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. 66 69 67 The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data. 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.) 68 80 69 81 Validation … … 123 135 ["length", "Ang", 400, [0, inf], "volume", 124 136 "Cylinder length"], 125 ["theta", "degrees", 60, [- inf, inf], "orientation",126 " latitude"],127 ["phi", "degrees", 60, [-inf, inf], "orientation",128 " longitude"],137 ["theta", "degrees", 60, [-360, 360], "orientation", 138 "cylinder axis to beam angle"], 139 ["phi", "degrees", 60, [-360, 360], "orientation", 140 "rotation about beam"], 129 141 ] 130 142 … … 152 164 tests = [[{}, 0.2, 0.042761386790780453], 153 165 [{}, [0.2], [0.042761386790780453]], 154 # new coords 166 # new coords 155 167 [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852], 156 168 [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]],
Note: See TracChangeset
for help on using the changeset viewer.