[da5536f] | 1 | .. _orientation: |
---|
| 2 | |
---|
| 3 | Oriented particles |
---|
| 4 | ================== |
---|
| 5 | |
---|
[7e6bc45e] | 6 | With two dimensional small angle diffraction data sasmodels will calculate |
---|
[e964ab1] | 7 | scattering from oriented particles, applicable for example to shear flow |
---|
| 8 | or orientation in a magnetic field. |
---|
[da5536f] | 9 | |
---|
[3d40839] | 10 | In general we first need to define the reference orientation |
---|
[7e6bc45e] | 11 | of the particle's $a$-$b$-$c$ axes with respect to the incoming |
---|
| 12 | neutron or X-ray beam. This is done using three angles: $\theta$ and $\phi$ |
---|
| 13 | define the orientation of the $c$-axis of the particle, and angle $\Psi$ is |
---|
| 14 | defined as the orientation of the major axis of the particle cross section |
---|
| 15 | with respect to its starting position along the beam direction (or |
---|
| 16 | equivalently, as rotation about the $c$ axis). There is an unavoidable |
---|
| 17 | ambiguity when $c$ is aligned with $z$ in that $\phi$ and $\Psi$ both |
---|
| 18 | serve to rotate the particle about $c$, but this symmetry is destroyed |
---|
| 19 | when $\theta$ is not a multiple of 180. |
---|
| 20 | |
---|
| 21 | The figures below are for an elliptical cross section cylinder, but may |
---|
| 22 | be applied analogously to other shapes of particle. |
---|
[da5536f] | 23 | |
---|
| 24 | .. note:: |
---|
[e964ab1] | 25 | It is very important to note that these angles, in particular $\theta$ |
---|
| 26 | and $\phi$, are NOT in general the same as the $\theta$ and $\phi$ |
---|
| 27 | appearing in equations for the scattering form factor which gives the |
---|
| 28 | scattered intensity or indeed in the equation for scattering vector $Q$. |
---|
| 29 | The $\theta$ rotation must be applied before the $\phi$ rotation, else |
---|
| 30 | there is an ambiguity. |
---|
[da5536f] | 31 | |
---|
| 32 | .. figure:: |
---|
| 33 | orient_img/elliptical_cylinder_angle_definition.png |
---|
| 34 | |
---|
[e964ab1] | 35 | Definition of angles for oriented elliptical cylinder, where axis_ratio |
---|
[7e6bc45e] | 36 | b/a is shown >1. Note that rotation $\theta$, initially in the $x$-$z$ |
---|
[3d40839] | 37 | plane, is carried out first, then rotation $\phi$ about the $z$-axis, |
---|
[e964ab1] | 38 | finally rotation $\Psi$ is around the axis of the cylinder. The neutron |
---|
[7e6bc45e] | 39 | or X-ray beam is along the $-z$ axis. |
---|
[da5536f] | 40 | |
---|
| 41 | .. figure:: |
---|
| 42 | orient_img/elliptical_cylinder_angle_projection.png |
---|
| 43 | |
---|
[e964ab1] | 44 | Some examples of the orientation angles for an elliptical cylinder, |
---|
| 45 | with $\Psi$ = 0. |
---|
[da5536f] | 46 | |
---|
[7e6bc45e] | 47 | Having established the mean direction of the particle (the view) we can then |
---|
| 48 | apply angular orientation distributions (jitter). This is done by a numerical |
---|
| 49 | integration over a range of angles in a similar way to particle size |
---|
| 50 | dispersity. The orientation dispersity is defined with respect to the |
---|
| 51 | $a$-$b$-$c$ axes of the particle, with roll angle $\Psi$ about the $c$-axis, |
---|
| 52 | yaw angle $\theta$ about the $b$-axis and pitch angle $\phi$ about the |
---|
| 53 | $a$-axis. |
---|
| 54 | |
---|
[0d5a655] | 55 | You can explore the view and jitter angles interactively using |
---|
| 56 | :func:`sasmodels.jitter.run`. Enter the following into the python |
---|
| 57 | interpreter:: |
---|
| 58 | |
---|
| 59 | from sasmodels import jitter |
---|
| 60 | jitter.run() |
---|
| 61 | |
---|
[7e6bc45e] | 62 | More formally, starting with axes $a$-$b$-$c$ of the particle aligned |
---|
| 63 | with axes $x$-$y$-$z$ of the laboratory frame, the orientation dispersity |
---|
| 64 | is applied first, using the |
---|
| 65 | `Tait-Bryan <https://en.wikipedia.org/wiki/Euler_angles#Conventions_2>`_ |
---|
| 66 | $x$-$y'$-$z''$ convention with angles $\Delta\phi$-$\Delta\theta$-$\Delta\Psi$. |
---|
| 67 | The reference orientation then follows, using the |
---|
| 68 | `Euler angles <https://en.wikipedia.org/wiki/Euler_angles#Conventions>`_ |
---|
| 69 | $z$-$y'$-$z''$ with angles $\phi$-$\theta$-$\Psi$. This is implemented |
---|
| 70 | using rotation matrices as |
---|
| 71 | |
---|
| 72 | .. math:: |
---|
| 73 | |
---|
| 74 | R = R_z(\phi)\, R_y(\theta)\, R_z(\Psi)\, |
---|
| 75 | R_x(\Delta\phi)\, R_y(\Delta\theta)\, R_z(\Delta\Psi) |
---|
| 76 | |
---|
| 77 | To transform detector $(q_x, q_y)$ values into $(q_a, q_b, q_c)$ for the |
---|
| 78 | shape in its canonical orientation, use |
---|
| 79 | |
---|
| 80 | .. math:: |
---|
| 81 | |
---|
| 82 | [q_a, q_b, q_c]^T = R^{-1} \, [q_x, q_y, 0]^T |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | The inverse rotation is easily calculated by rotating the opposite directions |
---|
| 86 | in the reverse order, so |
---|
| 87 | |
---|
| 88 | .. math:: |
---|
| 89 | |
---|
| 90 | R^{-1} = R_z(-\Delta\Psi)\, R_y(-\Delta\theta)\, R_x(-\Delta\phi)\, |
---|
| 91 | R_z(-\Psi)\, R_y(-\theta)\, R_z(-\phi) |
---|
| 92 | |
---|
[da5536f] | 93 | |
---|
[3d40839] | 94 | The $\theta$ and $\phi$ orientation parameters for the cylinder only appear |
---|
[5fb0634] | 95 | when fitting 2d data. On introducing "Orientational Distribution" in the |
---|
[7e6bc45e] | 96 | angles, "distribution of theta" and "distribution of phi" parameters will |
---|
[e964ab1] | 97 | appear. These are actually rotations about the axes $\delta_1$ and $\delta_2$ |
---|
[7e6bc45e] | 98 | of the cylinder, which correspond to the $b$ and $a$ axes of the cylinder |
---|
| 99 | cross section. (When $\theta = \phi = 0$ these are parallel to the $Y$ and |
---|
| 100 | $X$ axes of the instrument.) The third orientation distribution, in $\Psi$, |
---|
| 101 | is about the $c$ axis of the particle. Some experimentation may be required |
---|
| 102 | to understand the 2d patterns fully. A number of different shapes of |
---|
| 103 | distribution are available, as described for size dispersity, see |
---|
| 104 | :ref:`polydispersityhelp`. |
---|
| 105 | |
---|
| 106 | Given that the angular dispersion distribution is defined in cartesian space, |
---|
| 107 | over a cube defined by |
---|
| 108 | |
---|
| 109 | .. math:: |
---|
| 110 | |
---|
| 111 | [-\Delta \theta, \Delta \theta] \times |
---|
| 112 | [-\Delta \phi, \Delta \phi] \times |
---|
| 113 | [-\Delta \Psi, \Delta \Psi] |
---|
| 114 | |
---|
| 115 | but the orientation is defined over a sphere, we are left with a |
---|
| 116 | `map projection <https://en.wikipedia.org/wiki/List_of_map_projections>`_ |
---|
| 117 | problem, with different tradeoffs depending on how values in $\Delta\theta$ |
---|
| 118 | and $\Delta\phi$ are translated into latitude/longitude on the sphere. |
---|
| 119 | |
---|
[06ee63c] | 120 | Sasmodels is using the |
---|
| 121 | `equirectangular projection <https://en.wikipedia.org/wiki/Equirectangular_projection>`_. |
---|
| 122 | In this projection, square patches in angular dispersity become wedge-shaped |
---|
| 123 | patches on the sphere. To correct for the changing point density, there is a |
---|
| 124 | scale factor of $\sin(\Delta\theta)$ that applies to each point in the |
---|
| 125 | integral. This is not enough, though. Consider a shape which is tumbling |
---|
| 126 | freely around the $b$ axis, with $\Delta\theta$ uniform in $[-180, 180]$. At |
---|
| 127 | $\pm 90$, all points in $\Delta\phi$ map to the pole, so the jitter will have |
---|
[5fb0634] | 128 | a distinct angular preference. If the spin axis is along the beam (which |
---|
| 129 | will be the case for $\theta=90$ and $\Psi=90$) the scattering pattern |
---|
| 130 | should be circularly symmetric, but it will go to zero at $q_x = 0$ due to the |
---|
[06ee63c] | 131 | $\sin(\Delta\theta)$ correction. This problem does not appear for a shape |
---|
[7e6bc45e] | 132 | that is tumbling freely around the $a$ axis, with $\Delta\phi$ uniform in |
---|
| 133 | $[-180, 180]$, so swap the $a$ and $b$ axes so $\Delta\theta < \Delta\phi$ |
---|
[5fb0634] | 134 | and adjust $\Psi$ by 90. This works with the current sasmodels shapes due to |
---|
[06ee63c] | 135 | symmetry. |
---|
| 136 | |
---|
[8cfb486] | 137 | Alternative projections were considered. |
---|
| 138 | The `sinusoidal projection <https://en.wikipedia.org/wiki/Sinusoidal_projection>`_ |
---|
[06ee63c] | 139 | works by scaling $\Delta\phi$ as $\Delta\theta$ increases, and dropping those |
---|
| 140 | points outside $[-180, 180]$. The distortions are a little less for middle |
---|
| 141 | ranges of $\Delta\theta$, but they are still severe for large $\Delta\theta$ |
---|
[8cfb486] | 142 | and the model is much harder to explain. |
---|
| 143 | The `azimuthal equidistance projection <https://en.wikipedia.org/wiki/Azimuthal_equidistant_projection>`_ |
---|
| 144 | also improves on the equirectangular projection by extending the range of |
---|
| 145 | reasonable values for the $\Delta\theta$ range, with $\Delta\phi$ forming a |
---|
| 146 | wedge that cuts to the opposite side of the sphere rather than cutting to the |
---|
| 147 | pole. This projection has the nice property that distance from the center are |
---|
| 148 | preserved, and that $\Delta\theta$ and $\Delta\phi$ act the same. |
---|
| 149 | The `azimuthal equal area projection <https://en.wikipedia.org/wiki/Lambert_azimuthal_equal-area_projection>`_ |
---|
| 150 | is like the azimuthal equidistance projection, but it preserves area instead |
---|
| 151 | of distance. It also has the same behaviour for $\Delta\theta$ and $\Delta\phi$. |
---|
| 152 | The `Guyou projection <https://en.wikipedia.org/wiki/Guyou_hemisphere-in-a-square_projection>`_ |
---|
[06ee63c] | 153 | has an excellent balance with reasonable distortion in both $\Delta\theta$ |
---|
[5fb0634] | 154 | and $\Delta\phi$, as well as preserving small patches. However, it requires |
---|
| 155 | considerably more computational overhead, and we have not yet derived the |
---|
| 156 | formula for the distortion correction, measuring the degree of stretch at |
---|
| 157 | the point $(\Delta\theta, \Delta\phi)$ on the map. |
---|
[da5536f] | 158 | |
---|
[82592da] | 159 | .. note:: |
---|
[7e6bc45e] | 160 | Note that the form factors for oriented particles are performing |
---|
| 161 | numerical integrations over one or more variables, so care should be |
---|
| 162 | taken, especially with very large particles or more extreme aspect |
---|
| 163 | ratios. In such cases results may not be accurate, particularly at very |
---|
| 164 | high Q, unless the model has been specifically coded to use limiting |
---|
| 165 | forms of the scattering equations. |
---|
| 166 | |
---|
| 167 | For best numerical results keep the $\theta$ distribution narrower than |
---|
| 168 | the $\phi$ distribution. Thus for asymmetric particles, such as |
---|
| 169 | elliptical_cylinder, you may need to reorder the sizes of the three axes |
---|
| 170 | to acheive the desired result. This is due to the issues of mapping a |
---|
| 171 | rectanglar distribution onto the surface of a sphere. |
---|
| 172 | |
---|
| 173 | Users can experiment with the values of *Npts* and *Nsigs*, the number of steps |
---|
| 174 | used in the integration and the range spanned in number of standard deviations. |
---|
| 175 | The standard deviation is entered in units of degrees. For a "rectangular" |
---|
| 176 | distribution the full width should be $\pm \sqrt(3)$ ~ 1.73 standard deviations. |
---|
| 177 | The new "uniform" distribution avoids this by letting you directly specify the |
---|
[82592da] | 178 | half width. |
---|
| 179 | |
---|
[7e6bc45e] | 180 | The angular distributions may be truncated outside of the range -180 to +180 |
---|
| 181 | degrees, so beware of using saying a broad Gaussian distribution with large |
---|
| 182 | value of *Nsigs*, as the array of *Npts* may be truncated to many fewer |
---|
| 183 | points than would give a good integration,as well as becoming rather |
---|
| 184 | meaningless. (At some point in the future the actual dispersion arrays may be |
---|
| 185 | made available to the user for inspection.) |
---|
[e964ab1] | 186 | |
---|
| 187 | Some more detailed technical notes are provided in the developer section of |
---|
| 188 | this manual :ref:`orientation_developer` . |
---|
[da5536f] | 189 | |
---|
[7e6bc45e] | 190 | This definition of orientation is new to SasView 4.2. In earlier versions, |
---|
| 191 | the orientation distribution appeared as a distribution of view angles. |
---|
| 192 | This led to strange effects when $c$ was aligned with $z$, where changes |
---|
| 193 | to the $\phi$ angle served only to rotate the shape about $c$, rather than |
---|
| 194 | having a consistent interpretation as the pitch of the shape relative to |
---|
| 195 | the flow field defining the reference orientation. Prior to SasView 4.1, |
---|
| 196 | the reference orientation was defined using a Tait-Bryan convention, making |
---|
| 197 | it difficult to control. Now, rotation in $\theta$ modifies the spacings |
---|
| 198 | in the refraction pattern, and rotation in $\phi$ rotates it in the detector |
---|
| 199 | plane. |
---|
| 200 | |
---|
| 201 | |
---|
[da5536f] | 202 | *Document History* |
---|
| 203 | |
---|
[7e6bc45e] | 204 | | 2017-11-06 Richard Heenan |
---|
| 205 | | 2017-12-20 Paul Kienzle |
---|