From 465d76476821edb8dc9179002d09cb96623a6206 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Sun, 12 Jun 2011 15:30:09 +0200 Subject: [PATCH] improve the documentation - document all the diffractomteres geometries and all pseudo axes - document the configure option for the GUI and the documentation --- Documentation/sphinx/Makefile.am | 8 +- Documentation/sphinx/source/development.rst | 37 ++- Documentation/sphinx/source/diffractometers.rst | 269 --------------------- .../sphinx/source/diffractometers/e4cv.rst | 108 +++++++++ .../sphinx/source/diffractometers/e6c.rst | 138 +++++++++++ .../sphinx/source/diffractometers/k4cv.rst | 127 ++++++++++ .../sphinx/source/diffractometers/k6c.rst | 160 ++++++++++++ .../sphinx/source/diffractometers/mars.rst | 101 ++++++++ .../sphinx/source/diffractometers/med2_2.rst | 46 ++++ .../sphinx/source/diffractometers/zaxis.rst | 55 +++++ Documentation/sphinx/source/index.rst | 8 +- Documentation/sphinx/source/introduction.rst | 47 ++-- 12 files changed, 800 insertions(+), 304 deletions(-) delete mode 100644 Documentation/sphinx/source/diffractometers.rst create mode 100644 Documentation/sphinx/source/diffractometers/e4cv.rst create mode 100644 Documentation/sphinx/source/diffractometers/e6c.rst create mode 100644 Documentation/sphinx/source/diffractometers/k4cv.rst create mode 100644 Documentation/sphinx/source/diffractometers/k6c.rst create mode 100644 Documentation/sphinx/source/diffractometers/mars.rst create mode 100644 Documentation/sphinx/source/diffractometers/med2_2.rst create mode 100644 Documentation/sphinx/source/diffractometers/zaxis.rst diff --git a/Documentation/sphinx/Makefile.am b/Documentation/sphinx/Makefile.am index 05bee212..3ec796b2 100644 --- a/Documentation/sphinx/Makefile.am +++ b/Documentation/sphinx/Makefile.am @@ -1,7 +1,13 @@ EXTRA_DIST = \ source/conf.py.in \ source/development.rst \ - source/diffractometers.rst \ + source/diffractometers/e4cv.rst \ + source/diffractometers/mars.rst \ + source/diffractometers/k4cv.rst \ + source/diffractometers/e6c.rst \ + source/diffractometers/k6c.rst \ + source/diffractometers/zaxis.rst \ + source/diffractometers/med2_2.rst \ source/index.rst \ source/introduction.rst diff --git a/Documentation/sphinx/source/development.rst b/Documentation/sphinx/source/development.rst index 74473376..9f39b8c4 100644 --- a/Documentation/sphinx/source/development.rst +++ b/Documentation/sphinx/source/development.rst @@ -1,10 +1,10 @@ .. _development: Developpement -============= +############# Getting hkl ------------ +*********** To get hkl, you can download the last stable version from sourceforge or if you want the latest development version use `git `_ or @@ -23,20 +23,36 @@ then checkout the next branch like this:: $ git checkout -b next origin/next Building hkl ------------- +************ To build hkl you need `Python 2.3+ `_ and the `GNU Scientific Library 1.12 `_:: - $ ./configure + $ ./configure --disable-ghkl $ make - $ make install (as root) + $ sudo make install + +you can also build a GUI interfaces which use `gtkmm `_:: + + $ ./configure + $ make + $ sudo make install + +eventually if you want to work also on the documentation you need: + ++ `gtk-doc `_ for the api ++ `sphinx `_ for the html and latex doc. ++ `asymptote `_ for the figures.:: + + $ ./configure --enable-gtk-doc + $ make + $ make html Hacking hkl ------------ +*********** you can send your patch to `Picca Frédéric-Emmanuel `_ using -git +``git`` The developpement process is like this. Suppose you wan to add a new feature to hkl create first a new branch from the next one:: @@ -59,13 +75,14 @@ email your work using git format-patch:: and send generated files `0001_xxx`, `0002_xxx`, ... to the author. Howto add a diffractometer --------------------------- +************************** In this section we will describe all steps requiered to add a new diffractometer. We will use the kappa 4 circles exemple. Adding Geometry -``````````````` +=============== + .. highlight:: c :linenothreshold: 5 @@ -143,7 +160,7 @@ variable number of parameters you just need to take care of this with the va_arg methods. Adding PseudoAxis mode -`````````````````````` +====================== Suppose you want to add a new mode to the hkl pseudo axes. Lets call it ``psi constant vertical`` to the eulerian 6 circle geometry. diff --git a/Documentation/sphinx/source/diffractometers.rst b/Documentation/sphinx/source/diffractometers.rst deleted file mode 100644 index a312792f..00000000 --- a/Documentation/sphinx/source/diffractometers.rst +++ /dev/null @@ -1,269 +0,0 @@ -.. _diffractometers: - -Diffractometer -============== - -Eulerian 4 circles ------------------- - -Geometries -`````````` - -Eulerian 4 circles vertical - -.. figure:: ../../figures/3S+1D.png - :align: center - :width: 8cm - - Schematic view of the diffractometer. - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 3 axes for the sample - - + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - + **chi** : rotating around the :math:`\vec{x}` direction (1, 0, 0) - + **phi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 1 axis for the detector - - + **tth** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - -Soleil Mars Beamline - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 3 axes for the sample - - + **omega** : rotating around the :math:`\vec{z}` direction (0, -1, 0) - + **chi** : rotating around the :math:`\vec{x}` direction (-1, 0, 0) - + **phi** : rotating around the :math:`\vec{z}` direction (0, 0, 1) - -+ 1 axis for the detector - - + **tth** : rotation around the :math:`\vec{z}` direction (0, -1, 0) - -Pseudo axes -``````````` - -**hkl** -....... - -PseudoAxes provided : **h**, **k** and **l** - -+ mode **bissector** - - + Axes: **omega**, **chi**, **phi**, **tth** - + Parameters : No parameter - - This mode add the bissector constrain ``tth = 2 * omega``. In this - mode the **chi** circle containt the vector of diffusion - :math:`\vec{Q}`. So it is easy to know the orientation of the hkl - plan. - -+ mode **constant_omega** - - + Axes : **chi**, **phi**, **tth** - + Parameters : No parameter - - This mode do not move the current **omega** axis. - -+ mode **constant_chi** - - + Axes : **omega**, **phi**, **tth** - + Parameters : No parameter - - This mode do not move the current **chi** axis. - -+ mode **constant_phi** - - + Axes related : **omega**, **chi**, **tth** - + Parameters : No parameter - - This mode do not move the current **phi** axis. - -+ mode **double_diffraction** - - + Axes : **omega**, **chi**, **phi**, **tth** - + Parameters : **h2**, **k2**, **l2** - - This mode put a second hkl vector (**h2**, **k2**, **l2**) in - Bragg condition. This is usefull sometimes when you want to explore - two bragg peaks without moving your sample. - -+ mode **psi_constant** - - + Axes : **omega**, **chi**, **phi**, **tth** - + Parameters : **h2**, **k2**, **l2**, **psi** - - This mode allow to fix the value of the pseudo axis **psi** at a - constant value when you move around an **h**, **k** ,**l** - position. The (**h2**, **k2**, **l2**) vector is used as a reference - for the computation of the **psi** pseudo axis value. - - You can retrive and ``freeze`` the current value of the **psi** - pseudo axis value into the **psi** parameter when you initialize the - mode. But you can also write directly the value of the desired - **psi** parameter. - -**psi** -....... - -PseudoAxis provided : **psi** - -+ mode **psi** - - + Axes : **omega**, **chi**, **phi**, **tth** - + Parameters : **h1**, **k1**, **l1** - -Eulerian 6 circles ------------------- - -Geometry -```````` - -.. figure:: ../../figures/4S+2D.png - :align: center - :width: 8cm - - Schematic view of the diffractometer. - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 4 axes for the sample - - + **mu** : rotating around the :math:`\vec{z}` direction (0, 0, 1) - + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - + **chi** : rotating around the :math:`\vec{x}` direction (1, 0, 0) - + **phi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 2 axes for the detector - - + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - -PseudoAxes -`````````` - -Kappa 4 circles vertical ------------------------- - -Geometry -```````` - -.. figure:: ../../figures/k4cv.png - :align: center - :width: 8cm - - Schematic view of the diffractometer. - -For this geometry there is a special parameters called :math:`\alpha` which is the -angle between the kappa rotation axis and the :math:`\vec{y}` direction. - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 3 axes for the sample - - + **komega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - + **kappa** : rotating around the :math:`\vec{x}` direction (0, :math:`-\cos\alpha`, :math:`-\sin\alpha`) - + **kphi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 1 axis for the detector - - + **tth** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - -PseudoAxes -`````````` - -Kappa 6 circles ---------------- - -Geometry -```````` -For this geometry there is a special parameters called :math:`\alpha` which is the -angle between the kappa rotation axis and the :math:`\vec{y}` direction. - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 4 axes for the sample - - + **mu** : rotating around the :math:`\vec{z}` direction (0, 0, 1) - + **komega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - + **kappa** : rotating around the :math:`\vec{x}` direction (0, :math:`-\cos\alpha`, :math:`-\sin\alpha`) - + **kphi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 2 axes for the detector - - + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - -PseudoAxes -`````````` - -Z-Axis ------- - -Geometry -```````` - -For this geometry the **mu** axis is common to the sample and the detector. - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 2 axes for the sample - - + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 3 axis for the detector - - + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - -PseudoAxes -`````````` - -**hkl** -....... - -PseudoAxes provided : **h**, **k** and **l** - -+ mode **zaxis** - - + Axes : **omega**, **delta**, **gamma** - + Parameters : No parameter - -+ mode **reflectivity** - - + Axes : **mu**, **omega**, **delta**, **gamma** - + Parameters : No parameter - - This mode add the reflectivity constraint ``mu = gamma``. The - incomming beam angle and the outgoing beam angle are equals. - -SOLEIL SIXS MED2+2 ------------------- - -Geometry -```````` - -+ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) -+ 2 axes for the sample - - + **pitch** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) - -+ 3 axis for the detector - - + **pitch** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) - + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) - -PseudoAxes -`````````` - -**hkl** -....... - -PseudoAxes provided : **h**, **k** and **l** - -+ mode **mu_fixed** - - + Axes : **omega**, **gamma**, **delta** - + Parameters : No parameter diff --git a/Documentation/sphinx/source/diffractometers/e4cv.rst b/Documentation/sphinx/source/diffractometers/e4cv.rst new file mode 100644 index 00000000..ebbe6bfc --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/e4cv.rst @@ -0,0 +1,108 @@ +Eulerian 4 circles +################## + +Geometry +******** + +.. figure:: ../../../figures/3S+1D.png + :align: center + :width: 8cm + + Schematic view of the diffractometer. + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 3 axes for the sample + + + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + + **chi** : rotating around the :math:`\vec{x}` direction (1, 0, 0) + + **phi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 1 axis for the detector + + + **tth** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + +Pseudo axes +*********** + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **bissector** + + + Axes: **omega**, **chi**, **phi**, **tth** + + Parameters : No parameter + + This mode add the bissector constrain ``tth = 2 * omega``. In this + mode the **chi** circle containt the vector of diffusion + :math:`\vec{Q}`. So it is easy to know the orientation of the hkl + plan. + ++ mode **constant_omega** + + + Axes : **chi**, **phi**, **tth** + + Parameters : No parameter + + This mode do not move the current **omega** axis. + ++ mode **constant_chi** + + + Axes : **omega**, **phi**, **tth** + + Parameters : No parameter + + This mode do not move the current **chi** axis. + ++ mode **constant_phi** + + + Axes related : **omega**, **chi**, **tth** + + Parameters : No parameter + + This mode do not move the current **phi** axis. + ++ mode **double_diffraction** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in + Bragg condition. This is usefull sometimes when you want to explore + two bragg peaks without moving your sample. + ++ mode **psi_constant** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h2**, **k2**, **l2**, **psi** + + This mode allow to fix the value of the pseudo axis **psi** at a + constant value when you move around an **h**, **k** , **l** + position. The (**h2**, **k2**, **l2**) vector is used as a reference + for the computation of the **psi** pseudo axis value. + + You can retrive and ``freeze`` the current value of the **psi** + pseudo axis value into the **psi** parameter when you initialize the + mode. But you can also write directly the value of the desired + **psi** parameter. + +psi +=== + +PseudoAxis provided : **psi** + ++ mode **psi** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h1**, **k1**, **l1** + +q += + +PseudoAxis provided : **q** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` + ++ mode : **q** + + + Axes : **"tth"** + + Parameters : no parameter + diff --git a/Documentation/sphinx/source/diffractometers/e6c.rst b/Documentation/sphinx/source/diffractometers/e6c.rst new file mode 100644 index 00000000..f8803a91 --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/e6c.rst @@ -0,0 +1,138 @@ +Eulerian 6 circles +################## + +Geometry +******** + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 4 axes for the sample + + + **mu** : rotating around the :math:`\vec{z}` direction (0, 0, 1) + + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + + **chi** : rotating around the :math:`\vec{x}` direction (1, 0, 0) + + **phi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 2 axes for the detector + + + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + +PseudoAxes +********** + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **bissector_vertical** + + + Axes: **omega**, **chi**, **phi**, **delta** + + Parameters : No parameter + + This mode add the bissector constrain ``delta = 2 * omega``. In this + mode the **chi** circle containt the vector of diffusion + :math:`\vec{Q}`. So it is easy to know the orientation of the hkl + plan. + ++ mode **constant_omega_vertical** + + + Axes: **"chi"**, **"phi"**, **"delta"** + + Parameters : no parameter + + This mode do not move the **omega** axis. + ++ mode **constant_chi_vertical** + + + Axes: **"omega"**, **"phi"**, **"delta"** + + Parameters : no parameter + + This mode do not move the **chi** axis. + ++ mode **constant_phi_vertical** + + + Axes : **"omega"**, **"chi"**, **"delta"** + + Parameters : no parameter + + This mode do not move the **phi** axis. + ++ mode : **lifting_detector_phi** + + + Axes : **"phi"**, **"gamma"**, **"delta"** + + Parameters : No Parameters + ++ mode : **lifting_detector_omega** + + + Axes : **"omega"**, **"gamma"**, **"delta"** + + Parameters : No Parameters + ++ mode : **lifting_detector_mu** + + + Axes : **"mu"**, **"gamma"**, **"delta"** + + Parameters : No Parameters + ++ mode : **double_diffraction vertical** + + + Axes : **"omega"**, **"chi"**, **"phi"**, **"delta"** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in Bragg + condition. This is usefull sometimes when you want to explore two + bragg peaks without moving your sample. + ++ mode : **bissector_horizontal** + + + Axes : **"mu"**, **"omega"**, **"chi"**, **"phi"**, **"gamma"** + + Parameters : No parameters + ++ mode : **double_diffraction_horizontal** + + + Axes : **"mu"**, **"omega"**, **"chi"**, **phi**, **"gamma"** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in Bragg + condition. This is usefull sometimes when you want to explore two + bragg peaks without moving your sample. + ++ mode : **psi_constant_vertical** + + + Axes : **"omega"**, **"chi"**, **phi**, **"delta"** + + Parameters : **h2**, **k2**, **l2**, **psi** + + This mode allow to fix the value of the pseudo axis **psi** at a + constant value when you move around an **h**, **k** , **l** + position. The (**h2**, **k2**, **l2**) vector is used as a reference + for the computation of the **psi** pseudo axis value. + + You can retrive and ``freeze`` the current value of the **psi** + pseudo axis value into the **psi** parameter when you initialize the + mode. But you can also write directly the value of the desired + **psi** parameter. + +psi +=== + +PseudoAxis provided : **psi** + ++ mode **psi_vertical** + + + Axes : **komega**, **kappa**, **kphi**, **delta** + + Parameters : **h1**, **k1**, **l1** + + The (**h1**, **k1**, **l1**) vector is used as a reference for the + computation of the **psi** pseudo axis value. + +q2 +== + +PseudoAxis provided : **q**, **alpha** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` +and **alpha** is the azimuth of :math:`\vec{Q}` in the ``yz`` +plan. The origin of this angles is the :math:`\vec{y}` vector, and the +positive rotation along :math:`\vec{x}` + ++ mode : **q2** + + + Axes : **"gamma"**, **"delta"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/diffractometers/k4cv.rst b/Documentation/sphinx/source/diffractometers/k4cv.rst new file mode 100644 index 00000000..74ad4db4 --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/k4cv.rst @@ -0,0 +1,127 @@ +Kappa 4 circles vertical +######################## + +Geometry +******** + +.. figure:: ../../../figures/k4cv.png + :align: center + :width: 8cm + + Schematic view of the diffractometer. + +For this geometry there is a special parameters called :math:`\alpha` which is the +angle between the kappa rotation axis and the :math:`\vec{y}` direction. + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 3 axes for the sample + + + **komega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + + **kappa** : rotating around the :math:`\vec{x}` direction (0, :math:`-\cos\alpha`, :math:`-\sin\alpha`) + + **kphi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 1 axis for the detector + + + **tth** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + +PseudoAxes +********** + +eulerians +========= + +PseudoAxes provides : **"omega"**, **"chi"**, **"phi"** + ++ mode **eulerians** + + + Axes : **komega**, **kappa**, **kphi** + + Parameters : **"solution"** + + When you compute the eulerians values from the kappa axes values, + there is two possibilities, so the **"solution"** parameter when set + 0 or 1 allow to switch from one solution to the other. + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **bissector** + + + Axes: **komega**, **kappa**, **kphi**, **tth** + + Parameters : No parameter + + This mode add the bissector constrain ``tth = 2 * omega``. In this + mode the equivalent eulerian **chi** circle containt the vector of + diffusion :math:`\vec{Q}`. So it is easy to know the orientation of + the hkl plan. + ++ mode **constant_omega** + + + Axes : **"komega"**, **"kappa"**, **"kphi"**, **"tth"** + + Parameters : **"omega"** + + This mode do not move the equivalent eulerian **omega** axis, fixed + by the parameter of the mode. + ++ mode **constant_chi** + + + Axes : **"komega"**, **"kappa"**, **"kphi"**, **"tth"** + + Parameters : **"chi"** + + This mode do not move the equivalent eulerian **chi** axis fixed by + the parameter of the mode. + ++ mode **constant_phi** + + + Axes related : **"komega"**, **"kappa"**, **"kphi"**, **"tth"** + + Parameters : **"phi"** + + This mode do not move the equivalent eulerian **phi** axis fixed by + the parameter of the mode. + ++ mode **double_diffraction** + + + Axes : **komega**, **kappa**, **kphi**, **tth** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in Bragg + condition. This is usefull sometimes when you want to explore two + bragg peaks without moving your sample. + ++ mode **psi_constant** + + + Axes : **komega**, **kappa**, **kphi**, **tth** + + Parameters : **h2**, **k2**, **l2**, **psi** + + This mode allow to fix the value of the pseudo axis **psi** at a + constant value when you move around an **h**, **k** , **l** + position. The (**h2**, **k2**, **l2**) vector is used as a reference + for the computation of the **psi** pseudo axis value. + + You can retrive and ``freeze`` the current value of the **psi** + pseudo axis value into the **psi** parameter when you initialize the + mode. But you can also write directly the value of the desired + **psi** parameter. + +psi +=== + +PseudoAxis provided : **psi** + ++ mode **psi** + + + Axes : **komega**, **kappa**, **kphi**, **tth** + + Parameters : **h1**, **k1**, **l1** + +q += + +PseudoAxis provided : **q** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` + ++ mode : **q** + + + Axes : **"tth"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/diffractometers/k6c.rst b/Documentation/sphinx/source/diffractometers/k6c.rst new file mode 100644 index 00000000..c01054cc --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/k6c.rst @@ -0,0 +1,160 @@ +Kappa 6 circles +############### + +Geometry +******** + +For this geometry there is a special parameters called :math:`\alpha` which is the +angle between the kappa rotation axis and the :math:`\vec{y}` direction. + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 4 axes for the sample + + + **mu** : rotating around the :math:`\vec{z}` direction (0, 0, 1) + + **komega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + + **kappa** : rotating around the :math:`\vec{x}` direction (0, :math:`-\cos\alpha`, :math:`-\sin\alpha`) + + **kphi** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 2 axes for the detector + + + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + +PseudoAxes +********** + +eulerians +========= + +PseudoAxes provides : **"omega"**, **"chi"**, **"phi"** + ++ mode **eulerians** + + + Axes : **komega**, **kappa**, **kphi** + + Parameters : **"solution"** + + When you compute the eulerians values from the kappa axes values, + there is two possibilities, so the **"solution"** parameter when set + 0 or 1 allow to switch from one solution to the other. + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **bissector_vertical** + + + Axes: **komega**, **kappa**, **kphi**, **delta** + + Parameters : No parameter + + This mode add the bissector constrain ``tth = 2 * omega``. In this + mode the equivalent eulerian **chi** circle containt the vector of + diffusion :math:`\vec{Q}`. So it is easy to know the orientation of + the hkl plan. + ++ mode **constant_omega_vertical** + + + Axes: **"komega"**, **"kappa"**, **"kphi"**, **"delta"** + + Parameters : **omega** + + This mode do not move the equivalent eulerian **omega** axis. + ++ mode **constant_chi_vertical** + + + Axes: **"komega"**, **"kappa"**, **"kphi"**, **"delta"** + + Parameters : **chi** + + This mode do not move the equivalent eulerian **chi** axis. + ++ mode **constant_phi_vertical** + + + Axes : **"komega"**, **"kappa"**, **"kphi"**, **"delta"** + + Parameters : **phi** + + This mode do not move the equivalent eulerian **phi** axis. + ++ mode : **lifting_detector_kphi** + + + Axes : **"kphi"**, **"gamma"**, **"delta"** + + Parameters : No Parameters + ++ mode : **lifting_detector_mu** + + + Axes : **"mu"**, **"gamma"**, **"delta"** + + Parameters : No Parameters + ++ mode : **double_diffraction vertical** + + + Axes : **"komega"**, **"kappa"**, **"kphi"**, **"delta"** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in + Bragg condition. This is usefull sometimes when you want to explore + two bragg peaks without moving your sample. + ++ mode : **bissector_horizontal** + + + Axes : **"mu"**, **"komega"**, **"kappa"**, **"kphi"**, **"gamma"** + + Parameters : No parameters + ++ mode : **constant_phi_horizontal** + + + Axes : **"mu"**, **"komega"**, **"kappa"**, **"kphi"**, **"gamma"** + + Parameters : **phi** + ++ mode : **horizontal kphi constant** + + + Axes : **"mu"**, **"komega"**, **"kappa"**, **"gamma"** + + Parameters : no parameters + ++ mode : **double_diffraction_horizontal** + + + Axes : **"mu"**, **"komega"**, **"kappa"**, **kphi**, **"gamma"** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in + Bragg condition. This is usefull sometimes when you want to explore + two bragg peaks without moving your sample. + ++ mode : **psi_constant_vertical** + + + Axes : **"komega"**, **"kappa"**, **kphi**, **"delta"** + + Parameters : **h2**, **k2**, **l2**, **psi** + + This mode allow to fix the value of the pseudo axis **psi** at a + constant value when you move around an **h**, **k** , **l** + position. The (**h2**, **k2**, **l2**) vector is used as a reference + for the computation of the **psi** pseudo axis value. + + You can retrive and ``freeze`` the current value of the **psi** + pseudo axis value into the **psi** parameter when you initialize the + mode. But you can also write directly the value of the desired + **psi** parameter. + +psi +=== + +PseudoAxis provided : **psi** + ++ mode **psi_vertical** + + + Axes : **komega**, **kappa**, **kphi**, **delta** + + Parameters : **h1**, **k1**, **l1** + + The (**h1**, **k1**, **l1**) vector is used as a reference for the + computation of the **psi** pseudo axis value. + +q2 +== + +PseudoAxis provided : **q**, **alpha** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` +and **alpha** is the azimuth of :math:`\vec{Q}` in the ``yz`` +plan. The origin of this angles is the :math:`\vec{y}` vector, and the +positive rotation along :math:`\vec{x}` + ++ mode : **q2** + + + Axes : **"gamma"**, **"delta"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/diffractometers/mars.rst b/Documentation/sphinx/source/diffractometers/mars.rst new file mode 100644 index 00000000..f1242e80 --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/mars.rst @@ -0,0 +1,101 @@ +SOLEIL MARS +########### + +Geometry +******** + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 3 axes for the sample + + + **omega** : rotating around the :math:`\vec{z}` direction (0, -1, 0) + + **chi** : rotating around the :math:`\vec{x}` direction (-1, 0, 0) + + **phi** : rotating around the :math:`\vec{z}` direction (0, 0, 1) + ++ 1 axis for the detector + + + **tth** : rotation around the :math:`\vec{z}` direction (0, -1, 0) + +Pseudo axes +*********** + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **bissector** + + + Axes: **omega**, **chi**, **phi**, **tth** + + Parameters : No parameter + + This mode add the bissector constrain ``tth = 2 * omega``. In this + mode the **chi** circle containt the vector of diffusion + :math:`\vec{Q}`. So it is easy to know the orientation of the hkl + plan. + ++ mode **constant_omega** + + + Axes : **chi**, **phi**, **tth** + + Parameters : No parameter + + This mode do not move the current **omega** axis. + ++ mode **constant_chi** + + + Axes : **omega**, **phi**, **tth** + + Parameters : No parameter + + This mode do not move the current **chi** axis. + ++ mode **constant_phi** + + + Axes related : **omega**, **chi**, **tth** + + Parameters : No parameter + + This mode do not move the current **phi** axis. + ++ mode **double_diffraction** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h2**, **k2**, **l2** + + This mode put a second hkl vector (**h2**, **k2**, **l2**) in + Bragg condition. This is usefull sometimes when you want to explore + two bragg peaks without moving your sample. + ++ mode **psi_constant** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h2**, **k2**, **l2**, **psi** + + This mode allow to fix the value of the pseudo axis **psi** at a + constant value when you move around an **h**, **k** , **l** + position. The (**h2**, **k2**, **l2**) vector is used as a reference + for the computation of the **psi** pseudo axis value. + + You can retrive and ``freeze`` the current value of the **psi** + pseudo axis value into the **psi** parameter when you initialize the + mode. But you can also write directly the value of the desired + **psi** parameter. + +psi +=== + +PseudoAxis provided : **psi** + ++ mode **psi** + + + Axes : **omega**, **chi**, **phi**, **tth** + + Parameters : **h1**, **k1**, **l1** + +q += + +PseudoAxis provided : **q** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` + ++ mode : **q** + + + Axes : **"tth"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/diffractometers/med2_2.rst b/Documentation/sphinx/source/diffractometers/med2_2.rst new file mode 100644 index 00000000..02840a7c --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/med2_2.rst @@ -0,0 +1,46 @@ +SOLEIL SIXS MED2+2 +################## + +Geometry +******** + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 2 axes for the sample + + + **pitch** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 3 axis for the detector + + + **pitch** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + +PseudoAxes +********** + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **mu_fixed** + + + Axes : **omega**, **gamma**, **delta** + + Parameters : No parameter + +q2 +== + +PseudoAxis provided : **q**, **alpha** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` +and **alpha** is the azimuth of :math:`\vec{Q}` in the ``yz`` +plan. The origin of this angles is the :math:`\vec{y}` vector, and the +positive rotation along :math:`\vec{x}` + ++ mode : **q2** + + + Axes : **"gamma"**, **"delta"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/diffractometers/zaxis.rst b/Documentation/sphinx/source/diffractometers/zaxis.rst new file mode 100644 index 00000000..36014fd5 --- /dev/null +++ b/Documentation/sphinx/source/diffractometers/zaxis.rst @@ -0,0 +1,55 @@ +Z-Axis +###### + +Geometry +******** + +For this geometry the **mu** axis is common to the sample and the detector. + ++ xrays source fix allong the :math:`\vec{x}` direction (1, 0, 0) ++ 2 axes for the sample + + + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **omega** : rotating around the :math:`-\vec{y}` direction (0, -1, 0) + ++ 3 axis for the detector + + + **mu** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + + **delta** : rotation around the :math:`-\vec{y}` direction (0, -1, 0) + + **gamma** : rotation around the :math:`\vec{z}` direction (0, 0, 1) + +PseudoAxes +********** + +hkl +=== + +PseudoAxes provided : **h**, **k** and **l** + ++ mode **zaxis** + + + Axes : **omega**, **delta**, **gamma** + + Parameters : No parameter + ++ mode **reflectivity** + + + Axes : **mu**, **omega**, **delta**, **gamma** + + Parameters : No parameter + + This mode add the reflectivity constraint ``mu = gamma``. The + incomming beam angle and the outgoing beam angle are equals. + +q2 +== + +PseudoAxis provided : **q**, **alpha** + +where **q** is :math:`|\vec{Q}| = \frac{2 \tau}{\lambda} \sin{\theta}` +and **alpha** is the azimuth of :math:`\vec{Q}` in the ``yz`` +plan. The origin of this angles is the :math:`\vec{y}` vector, and the +positive rotation along :math:`\vec{x}` + ++ mode : **q2** + + + Axes : **"gamma"**, **"delta"** + + Parameters : no parameter diff --git a/Documentation/sphinx/source/index.rst b/Documentation/sphinx/source/index.rst index 8ba591bf..8eb69e6a 100644 --- a/Documentation/sphinx/source/index.rst +++ b/Documentation/sphinx/source/index.rst @@ -14,7 +14,13 @@ Contents: :titlesonly: introduction - diffractometers + diffractometers/e4cv + diffractometers/k4cv + diffractometers/e6c + diffractometers/k6c + diffractometers/zaxis + diffractometers/med2_2 + diffractometers/mars development Indices and tables diff --git a/Documentation/sphinx/source/introduction.rst b/Documentation/sphinx/source/introduction.rst index ec1ff63c..3cc25e64 100644 --- a/Documentation/sphinx/source/introduction.rst +++ b/Documentation/sphinx/source/introduction.rst @@ -1,14 +1,14 @@ .. _introduction: Introduction -============ +############ The purpose of the library is to factories diffraction angles computation for different kind of diffractometers geometries. It is used at the SOLEIL, Desy and Alba synchrotron with the Tango control system to pilot diffractometers. Features --------- +******** + mode computation (aka PseudoAxis) @@ -29,7 +29,7 @@ Features + psi, eulerians, q, ... Conventions ------------ +*********** In all this document the next convention will be used to describe the diffractometers geometries. @@ -40,10 +40,10 @@ geometries. La diffraction -============== +############## Le cristal ----------- +********** Un cristal périodique est l'association d'un réseau et d'un motif placé en chaque noeud du réseau. Un réseau est un ensemble de points, @@ -139,7 +139,7 @@ cette fois-ci pour calculer les sinus et cosinus des angles La Diffraction --------------- +************** soit un faisceau de rayon X dont le vecteur d'onde est :math:`\vec{k_{i}}`, :math:`|k_{i}|=\tau/\lambda` où :math:`\lambda` @@ -169,10 +169,10 @@ condition de diffraction à l'aide du réseau réciproque. Les quaternions ---------------- +*************** Propriétés -`````````` +========== Nous allons utiliser le formalisme des quaternions pour décrire les diffractomètres. Ces êtres mathématiques permettent de représenter des @@ -199,7 +199,7 @@ Son conjugé est : q^{*}=[a,-\vec{u}]=a-bi-cj-dk Opérations -`````````` +========== La grand différence avec l'algèbre des nombres complexes est sa non commutativité. @@ -241,7 +241,7 @@ ou encore pq==(at-bx-cy-dz)+(bt+ax+cz-dy)i+(ct+ay+dx-bz)j+(dt+az+by-cx)k Les rotation de l'espace 3D -``````````````````````````` +=========================== L'ensemble des quaternions unitaires (leur norme est égale à 1) est le groupe qui représente les rotations dans l'espace 3D. Si on a un @@ -286,10 +286,10 @@ La composition de rotation se fait simplement en multipliant les quaternions entre eux. Si l'on à :math:`q` Les Diffractomètres -=================== +################### Eulérien 3S+1D --------------- +************** Nous allons nous inspirer du modèle de Busin et Levy pour décrire notre diffractomètre. Les sens de rotation sont respectés mais le @@ -308,7 +308,7 @@ du diffractomètre sont présentés sur la figure~\ref{cap:3S+1D}. Dénomination des angles du diffractomètre 3S+1D Eulérien.\label{cap:3S+1D} Eulérien 4S+2D --------------- +************** Nous allons nous inspirer du modèle de You pour notre diffractomètre (fig.~\ref{cap:4S+2D}) ici présenté tous les angles mis à zéro. Les @@ -383,10 +383,10 @@ angles physique du diffractomètre. Modes de fonctionnement -======================= +####################### Equations fondamentales ------------------------ +*********************** Le problème que nous devons résoudre est de calculer pour une famille de plan :math:`(h,k,l)` donné, les angles de rotation du @@ -414,7 +414,7 @@ réciproque) à un repère orthonormé. Calcule de `B` --------------- +============== Si l'on connaît les paramètres cristallins du cristal étudié, il est très simple de calculer :math:`B`: @@ -429,7 +429,7 @@ très simple de calculer :math:`B`: Calcule de `U` --------------- +============== Il existe plusieurs façons de calculer :math:`U`. Busing et Levy en a proposé plusieurs. Nous allons présenter celle qui nécessite la mesure @@ -448,7 +448,7 @@ l'ensemble des paramètres cristallins ainsi que la matrice d'orientation. Algorithme de Busing Levy -````````````````````````` +========================= L'idée est de se placer dans le repère de l'axe sur lequel est monté l'échantillon. On mesure deux réflections @@ -481,7 +481,7 @@ Et donc U=T_{\vec{Q}}\cdot\tilde{T}_{\vec{h}} Affinement par la méthode du simplex -```````````````````````````````````` +==================================== Dans ce cas nous ne connaissons pas la matrice :math:`B`, il faut donc mesurer plus que deux réflections pour ajuster les 9 paramètres. Six @@ -541,7 +541,7 @@ Il faut maintenant faire la transformation inverse de la matrice Diffractomètre 4 Cercle (3S+1D) Eulerien ----------------------------------------- +**************************************** Pour ce diffractomètres, les matrices de rotations des différents axes sont les suivantes: @@ -621,7 +621,8 @@ laisser le choix suivant certaines stratégies à l'utilisateur d'utiliser telle ou telle solution plutôt qu'une autre. Mode Bisecteur -`````````````` +============== + Dans ce mode on choisit d'avoir: .. math:: @@ -723,7 +724,7 @@ La résolution du système donne alors 4 quadruplets de solutions: \end{tabular} Mode Delta Theta -```````````````` +================ Ce mode consiste à décaler :math:`\omega` par rapport à :math:`\theta` d'une valeur constante :math:`C`: @@ -776,7 +777,7 @@ La résolution donne 4 quadruplets de solutions: où Mode omega constant -``````````````````` +=================== Dans ce mode on choisit de garder :math:`\omega` toujours constant: -- 2.11.4.GIT