Data processing requires the specification of geometrical parameters that describe the diffraction experiment. The coordinate systems used by XDS to this purpose are explained in this chapter.

Laboratory coordinate system

Any convenient right-handed orthonormal system may be chosen with the origin at the intersection between rotation axis, direct beam and crystal. Once chosen, the coordinate system remains fixed throughout the diffraction experiment. Parameters like incident beam direction, detector location and orientation, direction of the rotation axis, crystal orientation, etc. are then specified by their components with respect to the chosen coordinate system.

In the laboratory coordinate system below, the y-axis points vertically down and is defined to be collinear with the detector swing axis (like for the SIEMENS). The z-axis lies within the plane spanned by the y-axis and the detector normal at swing angle 0, with +z pointing from the crystal towards the detector. The x-axis is defined to yield an orthonormal right handed laboratory coordinate system {x,y,z}. A typical experimental setup is shown below for the SIEMENS detector.

viewed from ABOVE:

                         detector

                             \
                              \
                               \
             |                  \
             |                   \
             |                    \
             |                     \
             |
---beam->-->-O-------------- +z
             |
             |
             |
             |
             |
            +x

viewed from the SIDE:

         swing axis
         omega axis
       2-theta axis
       rotation axis          detector
             |
             |
             |                   |
             |                   |
             |                   |
---beam->-->-O-------------- +z  |
             |                   |
             |                   |
             |                   |
             |
             |
            +y

Direct beam:
The positive beam direction points along +z from the source towards the crystal. If the beam is aligned normal to the y-axis and the detector surface at swing angle 0, the coordinates of the incident beam wavevector S0(.) are 0 0 1.

Rotation axis:
XDS requires that the frame increment (oscillation range) be positive. Thus the coordinates of the rotation axis are (SIEMENS):

0 1 0:
if the crystal rotates clockwise when proceeding to the next data frame and the camera is viewed from above.
0-1 0:
if the crystal rotates counterclockwise.

Detector position:
The swing axis coincides with the rotation axis and a positive swing angle chi (or 2-theta) corresponds to a clockwise rotation of the detector when viewed from above. In the drawing, the detector is set to a negative swing angle chi.


Detector coordinate system

Two-dimensional detector images are always stored as linear arrays in a file. A pixel at (IX,IY) in the two-dimensional image is found at position IX+NX*(IY-1) in the linear array, where NX is the number of "fast" pixels, NX*NY is the total number of image pixels, and IX= 1,..., NX, IY= 1,..., NY.

The orientation of the detector plane is described by two orthonormal vectors, ED(.,1) and ED(.,2), that specify the directions along the "fast" and "slow" pixels with respect to the laboratory system. The two vectors have to be provided by the user as the input parameters
DIRECTION_OF_DETECTOR_X-AXIS=ED(1,1) ED(2,1) ED(3,1)
DIRECTION_OF_DETECTOR_Y-AXIS=ED(1,2) ED(2,2) ED(3,2)

The third unit vector, the detector normal, is then defined as
ED(.,3)=ED(.,1) X ED(.,2).
Hence, the third unit vector has the components
ED(1,3)=ED(2,1)*ED(3,2)-ED(2,2)*ED(3,1)
ED(2,3)=ED(3,1)*ED(1,2)-ED(3,2)*ED(1,1)
ED(3,3)=ED(1,1)*ED(2,2)-ED(1,2)*ED(2,1)
with respect to the laboratory system.

Thus, the three vectors ED(.,1), ED(.,2), ED(.,3) form a right-handed orthonormal system, which is called the detector coordinate system. The origin of this coordinate system is placed in the detector surface at that point which is closest to the crystal. The pixel coordinates of the origin in the detector plane must be specified by the user as the input parameters ORGX= and ORGY=; they are at the intersection point of the direct-beam in the detector plane if the beam is perpendicular to the detector surface. The distance of the detector from the origin of the laboratory coordinate system is given by the input parameter DETECTOR_DISTANCE=F (mm).

An image pixel at IX,IY has the laboratory coordinates (mm units)
x=QX*(IX-ORGX)*ED(1,1)+QY*(IY-ORGY)*ED(1,2)+F*ED(1,3)
y=QX*(IX-ORGX)*ED(2,1)+QY*(IY-ORGY)*ED(2,2)+F*ED(2,3)
z=QX*(IX-ORGX)*ED(3,1)+QY*(IY-ORGY)*ED(3,2)+F*ED(3,3)
where QX and QY denote the length (mm) of "fast" and "slow" pixels, respectively. The laboratory coordinates of the origin on the detector surface are found at IX=ORGX, IY=ORGY as F*ED(.,3). Note, that the third vector ED(.,3) is always perpendicular to the detector surface but may point either towards the crystal or opposite to it. This effects the sign of F. If the normal points towards the crystal, the sign of F will be negative!


Determination of detector orientation

Usually, the manufacturer of the area detector provides the information required for setting up the two detector vectors
DIRECTION_OF_DETECTOR_X-AXIS=ED(1,1) ED(2,1) ED(3,1)
DIRECTION_OF_DETECTOR_Y-AXIS=ED(1,2) ED(2,2) ED(3,2)

Examples

  1. If the first pixel in an image file corresponds to the lower left corner and the "fast" pixels run from left to right if you look from the crystal towards the detector, the coordinates of the "fast" and "slow" directions are
    DIRECTION_OF_DETECTOR_X-AXIS= 1 0 0
    DIRECTION_OF_DETECTOR_Y-AXIS= 0 -1 0
    in the laboratory coordinate system described above. This leads to a negative value for DETECTOR_DISTANCE= -|F|, because the detector normal points towards the crystal.
  2. If the first pixel in an image file corresponds to the upper left corner (like for the MARCCD detector) and the "fast" pixels run from left to right if you look from the crystal towards the detector, the coordinates of the "fast" and "slow" directions are
    DIRECTION_OF_DETECTOR_X-AXIS= 1 0 0
    DIRECTION_OF_DETECTOR_Y-AXIS= 0 1 0
    in the laboratory coordinate system described above. This leads to a positive value for DETECTOR_DISTANCE= |F|, because the detector normal points away from the crystal.

If no such information is available you can easily find the directions of the detector X and Y axes by the following experimental procedure.

  1. Collect a data image with the upper left corner of the detector surface shielded from X-rays. Put the image on screen using the VIEW program, move the cursor to the shaded part, and find the pixel coordinates by pressing the left mouse button.
  2. Collect a data image with the lower left corner of the detector surface shielded from X-rays. Put this image on screen using the VIEW program, move the cursor to the shaded part, and find the pixel coordinates by pressing the left mouse button.

From the two measurements it is easy to figure out which way the "fast" and "slow" pixels run if you look from the source towards the detector. It is essential to use the VIEW program because the pixel coordinates IX,IY reported by the mouse click have the identical meaning in the XDS program.

WARNING: An incorrect choice of the vectors ED may well lead to incorrect signs of the anomalous intensity differences. As pointed out by Janet Smith (Purdue University, USA), the incorrect enantiomorph can be obtained by a negative F (instead of positive) and a detector Y-axis pointing opposite to the correct direction.


Wolfgang Kabsch 
page last updated: September 1, 2002