Diffractometer

This class provides the transformation from the setting angles of a six circle diffractometer into reciprocal space. There for we use mainly four frames in reciprocal Space: \theta -frame, \phi -frame, U -frame and (H,K,L) -frame.

Lab Frame

We define the lab frame \Sigma like in the paper about the four circle diffraction setup (Busing1967), i.e. the Z_4 -axis up, the Y_4 -axis along the X-ray beam and the X_4 -axis forms a right handed orthonganl system with the others. The figure shows the setup with all six angles and a diffrent lab frame from the paper Lohmeier1993 (X_6=Z_4, Y_6=Y_4, Z_6=-X_4).

\bf{a}_4 = V_{46} \bf{a}_6 = \begin{pmatrix} 0 & 0 & -1 \\
                                             0 & 1 &  0 \\
                                             1 & 0 &  0 \end{pmatrix} \bf{a}_6

_images/Lohmeier1993_Fig1.png

Rotations and Setting Angles

The rotation by \mu along the +Z_4-axis leads to \Sigma' followed by the angles familiar from the four circle setup, i.e. rotation by \theta along the +X_4'-axis leads to \Sigma'' (\theta-frame, \Sigma^\theta), rotation by \chi along the +Y_4''-axis leads to \Sigma''', and rotation by \phi along the +X_4'''-axis leads to \Sigma'''' (\phi-frame, \Sigma^\phi) The detector rotations start in \Sigma' with rotation by \delta along the +X_4' -axis into \Sigma^*, and rotation by \gamma along the +Z_4^* -axis into \Sigma^{**}. Note that in the origanal paper \mu is called \alpha. After this introduction we will drop most times the indices at the axes and refer to the four circle lab frame.

Rotations and frames for six circle geometry
Angle Axis4 Axis6 New Frame
\mu +Z_4 +X_6 \Sigma'
\theta +X_4' -Z_6' \Sigma'' (\Sigma^\theta)
\chi +Y_4'' +Y_6'' \Sigma'''
\phi +X_4''' -Z_6''' \Sigma'''' (\Sigma^\phi)
\delta +X_4' -Z_6' \Sigma^*
\gamma +Z_4^* +X_6^* \Sigma^{**}

Rotation matrcies

Rotation of a vector \bf{a} along the Z-axis by the angle \alpha is discribed by the rotaion matrix R_Z(\alpha)

R_Z(\alpha) &= \begin{pmatrix} \cos(\alpha) & -\sin(\alpha) & 0 \\
                               \sin(\alpha) &  \cos(\alpha) & 0 \\
                               0            &  0            & 1 \end{pmatrix} \\
\bf{a}' &= R_Z(\alpha) \bf{a}

The back transformation is the transposed R_Z(\alpha)^\mathrm{T} or R_Z(-\alpha), the back rotation. If the coordinate system is rotated by the angle \alpha, R_Z(-\alpha) is the transformation. For completness the other two rotation matrices along the principle axes.

R_X(\alpha) &= \begin{pmatrix} 1 & -\sin(\alpha) &  0            \\
                               0 &  \cos(\alpha) & -\sin(\alpha) \\
                               0 &  \sin(\alpha) &  \cos(\alpha) \end{pmatrix} \\
R_Y(\alpha) &= \begin{pmatrix}  \cos(\alpha) &  0 & \sin(\alpha) \\
                                0            &  1 & 0            \\
                               -\sin(\alpha) &  0 & \cos(\alpha) \end{pmatrix}

Calculation of Q

The initial and final (scattered) wavevectors are \bf{k}_\mathrm{i}, \bf{k}_\mathrm{f} and have the same length k (elastic scattering). For all setting angels set to 0, \bf{k}_\mathrm{i} and \bf{k}_\mathrm{f} lay along the Y-axis.

\bf{k}_i(0) = \bf{k}_f(0) = \begin{pmatrix} 0 \\ k \\ 0 \end{pmatrix}

To get \bf{k}_\mathrm{i}'', i.e. in \Sigma_\theta, we have to apply the rotation matrix along Z by the angle -\mu and the rotation matrix along X' by the angle -\theta, because \bf{k}_\mathrm{i} = k_i(0) for all angles. To get \bf{k}_\mathrm{f}'' we have to considered that \bf{k}_\mathrm{f}^** = k_f(0) for all angles, becuase the measured scattered X-rays hit directly the detector. In a similar sence we need rotations by +\gamma along Z^* and by -\theta + \delta along X'.

\bf{k}_i'' &= R_X(-\theta) R_Z(-\mu) \bf{k}_i(0) \\
\bf{k}_f'' &= R_X(-\theta + \delta) R_Z(\gamma) \bf{k}_f(0)

Now we get \bf{Q}^\theta in \Sigma^\theta.

\bf{Q}^\theta = \bf{Q}'' = \bf{k}_f'' - \bf{k}_i''

If we take the rotations by \chi and \phi into account we come to \Sigma^\phi.

\bf{Q}^\phi = R_Z(-\phi) R_Y(-\chi) \bf{Q}^\theta

The last step is transforming from \Sigma^\phi_4 to \Sigma^\phi_6 and applying the inverse orientation matrix UB^{-1} from e.g. Spec SIXC to get the HKL-values.

\bf{Q}^{HKL} = UB^{-1} V_{46}^\mathrm{T} \bf{Q}^\phi

Diffractometer Class

class pyspec.diffractometer.Diffractometer(mode='sixc')

Diffractometer class

This class provides various functions to perform calculations to and from the sample and instrument frames

used lab frame: Z up, Y along X-ray beam, X = Y x Z; sample rotations: mu : along +Z -> S’ (mu-frame), theta : along +X’ -> S’’ (theta-frame), chi : along +Y’’ -> S’‘’ (chi-frame), phi : along +X’‘’ -> S’‘’’ (phi-frame); detector rotations: mu : along +Z -> S’ (mu-frame), delta : along +X’ -> S* (delta-frame), gamma : along +Z* -> S** (gamma-frame)

getQCart()

Calculate (Qx, Qy, Qz) set in cartesian reciprocal space from (Qx, Qy, Qz) set in theta-frame

still under construction

getQHKL()

Calc HKL values from (Qx, Qy, Qz) set in theta-frame with UB-matrix

QHKL = UB^-1 sixcToFourc^T QPhi

getQPhi()

Calculate (Qx, Qy, Qz) set in phi-frame from (Qx, Qy, Qz) set in theta-frame

QPhi = rotZ(-phi) rotY(-chi) QTheta

getQTheta()

Return transformed coordinates

setAllAngles(angles, mode='deg')

Sets angles for calculation. Angles are expected in spec ‘sixc’ order: Delta Theta Chi Phi Mu Gamma

setAngles(delta=None, theta=None, chi=None, phi=None, mu=None, gamma=None, mode='deg')

Set the angles for calculation

setEnergy(energy)

Set the energy (in eV) for calculations

setLambda(waveLen)

Set the wavelength (in Angstroms) for calculations

setUbMatrix(UBmat)

Sets the UB matrix

Table Of Contents

Previous topic

Calculating the standard error on the fly

Next topic

Helpful Utilities

This Page