What’s a Crystal? It’s a form of the matter in which the atoms are arranged in a periodic form. What’s the unit cell? It is the basic unit that by simple translations can generate the complete crystal. a3 a2 a1 Any physical property of the crystal is invariant under a translation t(u,v,w) defined as t(u,v,w) = u a1 + v a2 + w a3 u, v, w Z BRAGG’S LAW q q An X-ray will be diffracted by a set of crystal planes with a spacing d if 2d sin q = nl 12.39852 l (A) E (keV ) What the hell does h k l mean? h k l represents a family of parallel planes with one of them cutting the unit cell vectors a1, a2, a3 at a1/h, a2/k, a3/l (equivalent to give the canonical equation of the plane in direct lattice coordinates) And reciprocal space? Instead of using the reference system provided by the unit cell, one can define other one with the vectors b1, b2, b3 defined in such a way that h b1 + k b3 + l b3 give a vector normal to the family of h k l planes The reciprocal cell, with no physical existence, is the one formed by the vectors b1, b2, b3 What is expected from us? To provide a program that takes into account all the geometrical calculations to make their life as easy as just to type “br 4 4 0” in order to orient crystal and detectors to detect the 4 4 0 reflection Why there are so many SPEC geometries? Let’s try to answer ... Geometry Handling A vector v can be written in terms of the reciprocal lattice vectors as 3 v vi bi i 1 However, it is more convenient to work with a set of cartesian axes attached to the crystal choosing x axis parallel to b1 y axis in the plane of b1 and b2 z axis perpendicular to b1 and b2 b3 b2 z y x b1 The B matrix b3 b2 1 z y 3 x 2 b1 vc = B v b b cos b cos 1 2 3 2 B 0 b2 sin b3 sin 2 cos 1 0 0 1 / a3 sin cos a3 b1 b2 Cell Volume cos 1 cos 2 cos cos 1 sin 2 sin The U Matrix Now, we associate a set of cartesian axes to each of the circles of the diffractometer in such a way that are all coincident with the laboratory system when all the angles are zero The matrix U is the one transforming the coordinates from the crystal cartesian axes to the system mounted on the first circle (called phi in common geometries) That matrix is obtained experimentally from the positions of two reflections vf = U vc = UB v Rotations Now that the vector is expressed in terms of the systems fixed to one circle, all what we need to pass to the laboratory system is to know the positions of the motors and the rotation axis of each circle in the lab system Assuming angles are positive counter clockwise Rotation around X axis 1 0 0 cos 0 sin 0 sin cos Rotation around Y axis cos 0 sin 0 1 0 sin 0 cos Rotation around Z axis cos sin 0 sin cos 0 0 0 1 The SPEC FOURC Geometry z X-ray beam x y F 1st circle, rotates around z axis c 2nd circle, CLOCKWISE around y axis Q 3rd circle, rotates around z axis vlab = Q C F UB v v = (UB)-1 F-1 c-1 Q-1 vlab The ID20 Patch The System fourc geometry with an additional circle mounted on the phi circle. Its rotation axis is on the x axis in the lab system when all angles are set to zero. The rotation is positive when moving clockwise. The Problem When that circle, called rho, is moved, SPEC had no means of finding the reflections The Pain A diffraction peak obtained at rho=0 is lost when moving the motor and has to be found back by hand The (simple) solution The actual transformation is vlab = Q C F r UB v rho corresponds to a clockwise rotation around an x axis 1 0 0 0 cos r sinr sinr cos r 0 The solution consists on replacing the matrix UB calculated by SPEC by the matrix (r UB) at each movement of rho This is done by entering the values in the associative array UB and calling userUB Conclusion Only two circles are needed to orient a vector in space. Other circles serve to put constraints Each instrument is in a certain sense optimized for a set of experiments. Matrix product is not commutative, therefore, the slightest change implies a new set of equations There is no unified criterion about the reference systems nor about the positive sense of the rotations. To set a new instrument can be a real nightmare unless a detailed description of the code is available