Changes in sasmodels/models/elliptical_cylinder.py [fcb33e4:9802ab3] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/elliptical_cylinder.py
rfcb33e4 r9802ab3 57 57 define the axis of the cylinder using two angles $\theta$, $\phi$ and $\Psi$ 58 58 (see :ref:`cylinder orientation <cylinder-angle-definition>`). The angle 59 $\Psi$ is the rotational angle around its own long_c axis against the $q$ plane. 60 For example, $\Psi = 0$ when the $r_\text{minor}$ axis is parallel to the 61 $x$ axis of the detector. 59 $\Psi$ is the rotational angle around its own long_c axis. 62 60 63 61 All angle parameters are valid and given only for 2D calculation; ie, an 64 62 oriented system. 65 63 66 .. figure:: img/elliptical_cylinder_angle_definition. jpg64 .. figure:: img/elliptical_cylinder_angle_definition.png 67 65 68 Definition of angles for 2D 66 Definition of angles for oriented elliptical cylinder, where axis_ratio is drawn >1, 67 and angle $\Psi$ is now a rotation around the axis of the cylinder. 69 68 70 .. figure:: img/ cylinder_angle_projection.jpg69 .. figure:: img/elliptical_cylinder_angle_projection.png 71 70 72 71 Examples of the angles for oriented elliptical cylinders against the 73 detector plane. 72 detector plane, with $\Psi$ = 0. 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, the $b$ and $a$ axes of the 77 cylinder cross section. (When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.) 78 The third orientation distribution, in $\psi$, is about the $c$ axis of the particle. Some experimentation may be required to 79 understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation 80 distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.) 74 81 75 82 NB: The 2nd virial coefficient of the cylinder is calculated based on the … … 108 115 """ 109 116 110 from numpy import pi, inf, sqrt 117 from numpy import pi, inf, sqrt, sin, cos 111 118 112 119 name = "elliptical_cylinder" … … 125 132 ["sld", "1e-6/Ang^2", 4.0, [-inf, inf], "sld", "Cylinder scattering length density"], 126 133 ["sld_solvent", "1e-6/Ang^2", 1.0, [-inf, inf], "sld", "Solvent scattering length density"], 127 ["theta", "degrees", 90.0, [-360, 360], "orientation", " In planeangle"],128 ["phi", "degrees", 0, [-360, 360], "orientation", " Out of plane angle"],129 ["psi", "degrees", 0, [-360, 360], "orientation", " Major axis angle relative to Q"]]134 ["theta", "degrees", 90.0, [-360, 360], "orientation", "cylinder axis to beam angle"], 135 ["phi", "degrees", 0, [-360, 360], "orientation", "rotation about beam"], 136 ["psi", "degrees", 0, [-360, 360], "orientation", "rotation about cylinder axis"]] 130 137 131 138 # pylint: enable=bad-whitespace, line-too-long … … 149 156 + (length + radius) * (length + pi * radius)) 150 157 return 0.5 * (ddd) ** (1. / 3.) 158 q = 0.1 159 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 160 qx = q*cos(pi/6.0) 161 qy = q*sin(pi/6.0) 151 162 152 163 tests = [ … … 158 169 'sld_solvent':1.0, 'background':0.0}, 159 170 0.001, 675.504402], 171 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 160 172 ]
Note: See TracChangeset
for help on using the changeset viewer.