Changes in sasmodels/models/elliptical_cylinder.py [9802ab3:fcb33e4] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/elliptical_cylinder.py
r9802ab3 rfcb33e4 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. 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. 60 62 61 63 All angle parameters are valid and given only for 2D calculation; ie, an 62 64 oriented system. 63 65 64 .. figure:: img/elliptical_cylinder_angle_definition. png66 .. figure:: img/elliptical_cylinder_angle_definition.jpg 65 67 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. 68 Definition of angles for 2D 68 69 69 .. figure:: img/ elliptical_cylinder_angle_projection.png70 .. figure:: img/cylinder_angle_projection.jpg 70 71 71 72 Examples of the angles for oriented elliptical cylinders against the 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.) 73 detector plane. 81 74 82 75 NB: The 2nd virial coefficient of the cylinder is calculated based on the … … 115 108 """ 116 109 117 from numpy import pi, inf, sqrt , sin, cos110 from numpy import pi, inf, sqrt 118 111 119 112 name = "elliptical_cylinder" … … 132 125 ["sld", "1e-6/Ang^2", 4.0, [-inf, inf], "sld", "Cylinder scattering length density"], 133 126 ["sld_solvent", "1e-6/Ang^2", 1.0, [-inf, inf], "sld", "Solvent scattering length density"], 134 ["theta", "degrees", 90.0, [-360, 360], "orientation", " cylinder axis to beamangle"],135 ["phi", "degrees", 0, [-360, 360], "orientation", " rotation about beam"],136 ["psi", "degrees", 0, [-360, 360], "orientation", " rotation about cylinder axis"]]127 ["theta", "degrees", 90.0, [-360, 360], "orientation", "In plane angle"], 128 ["phi", "degrees", 0, [-360, 360], "orientation", "Out of plane angle"], 129 ["psi", "degrees", 0, [-360, 360], "orientation", "Major axis angle relative to Q"]] 137 130 138 131 # pylint: enable=bad-whitespace, line-too-long … … 156 149 + (length + radius) * (length + pi * radius)) 157 150 return 0.5 * (ddd) ** (1. / 3.) 158 q = 0.1159 # 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)162 151 163 152 tests = [ … … 169 158 'sld_solvent':1.0, 'background':0.0}, 170 159 0.001, 675.504402], 171 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ],172 160 ]
Note: See TracChangeset
for help on using the changeset viewer.