Orientation Matrices calculations Crystal reorientation

Orientation Matrices calculations
Crystal re­orientation
Pierre LEGRAND
Synchrotron­SOLEIL
Proxima1 Beamline Scientist
© 2004 hp
Diversity of goniometers
(handling of the sample)
Rotation (Intersecting Axes)
Single Axis
Eulerian Goniometers Rotation (Not intersecting)
Kappa Goniometers Robots arms 4 to 6 axis
Mini­Kappa
[Jacquamet L. et al Actad D60 2004] Translation
Motorized Goniometer (XY, Z, XYZ)
Motorized Head Translation (XY, Z, XYZ) Complex rotation/translations
Tripods
Hexapods 6/5/2005
Kappa Workgroup Meeting – Hamburg
page 2
A robot as a goniometer
(handling of the sample++)
•
•
•
•
Beam positioning
Sample changer
Multi­axis goniometer
Gain of space
[Jacquamet L. et al Actad D60 2004]
BM30A FIP­CRG French Beamline ESRF 6/5/2005
Kappa Workgroup Meeting – Hamburg
page 3
A robot as a goniometer
(handling of the sample++)
Emulating a Kappa goniometer...
(rotation around an arbitrary axis)
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 4
What is used on synchrotron BL?
Why aren't multi­axes used more extensively?
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 5
Lack of space... collisions
and lack of software!
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 6
Three Axis Orientation • Coordinate rotation by a three axis rotation system
• Virtual three circles goniosta
– 3 rotations around successive axes
– Axes can be defined by any set of 3 vectors
ex = Vector(1,0,0), ey = Vector(0,1,0), ez = Vector(0,0,1)
StandardAxes = ex, ey, ez
NoniusKappaAxes = ez, kappaVector(50), ez
EMBLKappaAxes = ez, kappaVector(24), ez
EulerAxes = ez, ex, ez
DenzoAxes = ez, ey, ex
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 7
Python class
Based on the Geometrical classes of the ScientificPython module made by Konrad Hinsen
•
•
•
•
Vectors objects
Tensor objects
Tensor Analysis module
Transformation
– Rotation
– Quaternions
– Translation
– Rotation+Translation
Transformation
Rotation
ThreeAxisRotation
http://starship.python.net/crew/hinsen/scientific.html
Uses Numerical Python
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 8
Constructor
ThreeAxisRotation(init,rotationAxes=(ex,
ey, ez),
3 immuable axes +
inversAxesOrder=0)
- rotationAxes is a tupple of 3
vectors (e1, e2, e3) defining
the three rotation axes.
- init can be either:
- a tensor object containing
A Tensor
Object (3x3)
Rotation
Object
the rotation matrix
- a Rotation object,
- a set of three angles
Set of 3
angles
(a1, a2, a3) in radian
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 9
Methodes
setAngles((a1,a2,a3))
addAngles((a1,a2,a3))
getAngles()
– Get angles from the tensor (2 solutions)
– This a reimplementation of the David Thomas's algorithm [1] described by Gerard Bricogne in [2]
[1] "Modern Equations of Diffractometry. Goniometry." D.J. Thomas
Acta Cryst. (1990) A46 Page 321-343.
[2] "The ECC Cooperative Programming Workshop on Position-Sensitive
Detector Software." G. Bricogne,
Computational aspect of Protein Crystal Data Analysis,
Proceedings of the Daresbury Study Weekend (23-24/01/1987)
Page 122-126
Methods added to Rotation in ScientificPython version >= 2.4.9:
Rotation.threeAngles(axes) return a 3 angles representation
Rotation.asQuaternion()
return a quaternion representation
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 10
Operations
Rot = Rot1 * Rot2
Rot.inverse(), Rot.dot(X), Rot.transpose()
Transformation = Rot * Translation
Vector2 = Rot(Vector1)
Other python Classes
class CrystalVector(Vector)
class OrthogonalizationMatrix(Tensor)
class CrystalOrienationMatrix()
class DegreeOfFreedom()
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 11
Applications
Virtual goniometer
HKL tango device server (6-cercles) c++ library
(done by PICCA Frédéric-Emmanuel)
Interonversion of OM to different program
conventions
Conversion of MR rotation solutions to different
program conventions
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 12
Applications
Virtual goniometer
The Virtual Goniometer will simulate any type of goniometer
composed of 3 consecutive axes.
Optionaly translations can be defined before
(pre-translation holding the first axis) or after the axes (posttranslation holded by the last axis).
= Combining DOFs (by holding order)
+ Intercept changes (hard limit, collision maps, self
shadow maps, strastegy)
+ Integrating orientation methods (gonset.py)
+ Calibration methods (positioning of the maps)
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 13
Crystal Orientation Matrices Conversion
Data Processing Programs use different convention and frame reference
– Mosflm uses 2 different representations for the OM and 2 different laboratory frame conventions (Detector and Crystal) – Denzo uses 3 different representations for the OM and 2 different laboratory frame convention (Detector and Crystal). Very difficulte to understand...
– XDS uses only one representations for the OM and one laboratory frame convention
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 14
Crystal Orientation Matrices Conversion
Needs:
– Numerical Python (could be replaced by another library)
– ScientificPython
Interconversion: Needs rewrite to us the new classes
–
–
–
–
–
–
6/5/2005
xds2mos.py (can start mosflm)
xds2dnz.py
mos2dnz.py
dnz2mos.py
dnx2xds.py
mos2xds.py
Kappa Workgroup Meeting – Hamburg
page 15
Thanks!
Questions?
6/5/2005
Kappa Workgroup Meeting – Hamburg
page 16