[hkl] 01/04: Imported Upstream version 4.99.99.1940

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Mon May 4 09:47:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch experimental
in repository hkl.

commit 78702262cb894b2e71dc0b56cd119ec7b0807b0f
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Mon May 4 10:47:42 2015 +0200

    Imported Upstream version 4.99.99.1940
---
 ChangeLog                                          |  457 ++++++++
 Documentation/Makefile.am                          |    8 +-
 Documentation/Makefile.in                          |    9 +-
 Documentation/api/html/api-index-full.html         |  180 ++-
 Documentation/api/html/ch01.html                   |    2 +-
 Documentation/api/html/hkl-darray.html             |    8 +-
 .../api/html/hkl-hkl-lattice-private.html          |    1 +
 .../api/html/hkl-hkl-parameter-private.html        |    4 +-
 ...kl-hkl-pseudoaxis-common-eulerians-private.html |   16 +-
 .../hkl-hkl-pseudoaxis-common-hkl-private.html     |    4 +-
 .../hkl-hkl-pseudoaxis-common-psi-private.html     |    4 +-
 .../html/hkl-hkl-pseudoaxis-common-q-private.html  |   30 +-
 .../api/html/hkl-hkl-pseudoaxis-private.html       |   65 +-
 Documentation/api/html/hkl-hkl-type-builtins.html  |    7 +
 Documentation/api/html/hkl-hkl.html                |   13 +
 Documentation/api/html/hkl-list.html               |    8 +-
 Documentation/api/html/hkl.devhelp2                |   16 +-
 Documentation/api/html/index.sgml                  |   14 +-
 Documentation/hkl.html                             | 1163 +++++++++++++++++---
 Documentation/hkl.org.in                           |  113 +-
 configure                                          |   22 +-
 gui/hkl-gui-3d.c                                   |    2 +-
 gui/hkl-gui-3d.h                                   |    2 +-
 gui/hkl-gui-macros.h                               |    2 +-
 gui/hkl-gui.c                                      |    2 +-
 gui/hkl-gui.h                                      |    2 +-
 hkl.h                                              |   14 +-
 hkl/Makefile.am                                    |    6 +-
 hkl/Makefile.in                                    |   29 +-
 hkl/hkl-axis-private.h                             |    2 +-
 hkl/hkl-axis.c                                     |    2 +-
 hkl/hkl-binding-private.h                          |    2 +-
 hkl/hkl-binding.c                                  |    2 +-
 hkl/hkl-detector-factory.c                         |    2 +-
 hkl/hkl-detector-private.h                         |    2 +-
 hkl/hkl-detector.c                                 |    2 +-
 hkl/hkl-engine-2c.c                                |   16 +-
 hkl/hkl-engine-e4c.c                               |  131 ++-
 hkl/hkl-engine-e6c.c                               |  141 +--
 hkl/hkl-engine-k4c.c                               |   65 +-
 hkl/hkl-engine-k6c.c                               |  383 ++++---
 hkl/hkl-engine-petra3-p09-eh2.c                    |   73 +-
 hkl/hkl-engine-soleil-sirius-turret.c              |   64 +-
 hkl/hkl-engine-soleil-sixs-med.c                   |  156 +--
 hkl/hkl-engine-template.c                          |   44 +-
 hkl/hkl-engine-zaxis.c                             |   59 +-
 hkl/hkl-factory-private.h                          |    2 +-
 hkl/hkl-factory.c                                  |    2 +-
 hkl/hkl-geometry-private.h                         |    2 +-
 hkl/hkl-geometry.c                                 |    2 +-
 hkl/hkl-interval-private.h                         |    2 +-
 hkl/hkl-interval.c                                 |    2 +-
 hkl/hkl-lattice-private.h                          |    3 +-
 hkl/hkl-lattice.c                                  |   95 +-
 hkl/hkl-macros-private.h                           |    2 +-
 hkl/hkl-macros.c                                   |    2 +-
 hkl/hkl-matrix-private.h                           |    2 +-
 hkl/hkl-matrix.c                                   |    2 +-
 hkl/hkl-parameter-private.h                        |    2 +-
 hkl/hkl-parameter.c                                |    2 +-
 hkl/hkl-pseudoaxis-auto-private.h                  |    2 +-
 hkl/hkl-pseudoaxis-auto.c                          |    2 +-
 hkl/hkl-pseudoaxis-common-eulerians-private.h      |   15 +-
 hkl/hkl-pseudoaxis-common-eulerians.c              |  110 +-
 hkl/hkl-pseudoaxis-common-hkl-private.h            |   26 +-
 hkl/hkl-pseudoaxis-common-hkl.c                    |   46 +-
 hkl/hkl-pseudoaxis-common-psi-private.h            |    4 +-
 hkl/hkl-pseudoaxis-common-psi.c                    |   22 +-
 hkl/hkl-pseudoaxis-common-q-private.h              |   12 +-
 hkl/hkl-pseudoaxis-common-q.c                      |  128 ++-
 hkl/hkl-pseudoaxis-common-readonly-private.h       |   88 ++
 hkl/hkl-pseudoaxis-common-readonly.c               |  174 +++
 ...ivate.h => hkl-pseudoaxis-common-tth-private.h} |   16 +-
 hkl/hkl-pseudoaxis-common-tth.c                    |  173 +++
 hkl/hkl-pseudoaxis-private.h                       |  145 +--
 hkl/hkl-pseudoaxis.c                               |   27 +-
 hkl/hkl-quaternion-private.h                       |    2 +-
 hkl/hkl-quaternion.c                               |    2 +-
 hkl/hkl-sample-private.h                           |    2 +-
 hkl/hkl-sample.c                                   |   30 +-
 hkl/hkl-source-private.h                           |    2 +-
 hkl/hkl-source.c                                   |    2 +-
 hkl/hkl-type-builtins.c                            |   16 +
 hkl/hkl-type-builtins.h                            |    2 +
 hkl/hkl-types.c                                    |    2 +-
 hkl/hkl-types.h                                    |    2 +-
 hkl/hkl-unit-private.h                             |    2 +-
 hkl/hkl-unit.c                                     |    2 +-
 hkl/hkl-vector-private.h                           |    2 +-
 hkl/hkl-vector.c                                   |    2 +-
 hkl3d/hkl3d.h                                      |    2 +-
 tests/bindings/python.py                           |   56 +-
 tests/hkl-axis-t.c                                 |    2 +-
 tests/hkl-bench-t.c                                |    3 +-
 tests/hkl-detector-t.c                             |    2 +-
 tests/hkl-geometry-t.c                             |    2 +-
 tests/hkl-interval-t.c                             |    2 +-
 tests/hkl-lattice-t.c                              |   29 +-
 tests/hkl-matrix-t.c                               |    2 +-
 tests/hkl-parameter-t.c                            |    2 +-
 tests/hkl-pseudoaxis-e4ch-t.c                      |    2 +-
 tests/hkl-pseudoaxis-e4cv-t.c                      |    2 +-
 tests/hkl-pseudoaxis-e6c-t.c                       |    2 +-
 tests/hkl-pseudoaxis-k4cv-t.c                      |    2 +-
 tests/hkl-pseudoaxis-k6c-t.c                       |    2 +-
 tests/hkl-pseudoaxis-t.c                           |   56 +-
 tests/hkl-pseudoaxis-zaxis-t.c                     |    2 +-
 tests/hkl-quaternion-t.c                           |    2 +-
 tests/hkl-sample-t.c                               |    2 +-
 tests/hkl-source-t.c                               |    2 +-
 tests/hkl-unit-t.c                                 |    2 +-
 tests/hkl-vector-t.c                               |    2 +-
 tests/hkl3d-test-t.c                               |    2 +-
 tests/tap/hkl-tap.h                                |    2 +-
 114 files changed, 3481 insertions(+), 1234 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9d06918..508b3e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,462 @@
 # Generated by Makefile. Do not edit.
 
+commit 926aabb78c5d91447aa6e7c426f8d6888d866103
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Mon May 4 10:38:02 2015 +0200
+
+    [doc] spell
+
+ Documentation/hkl.org.in | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+commit c177b5fcc3c8b7b810bb80db507bd338fc8c23e7
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Mon May 4 09:56:58 2015 +0200
+
+    [hkl] fix a bug in the hkl_engine_parameter_set method
+    
+    also expose this method in the binding for petraIII
+
+ Documentation/hkl.org.in | 2 ++
+ hkl/hkl-pseudoaxis.c     | 5 +++--
+ tests/hkl-pseudoaxis-t.c | 2 +-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+commit b8eeb6221e68706e7fa26b54b6e92d37bfd74ddc
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 24 14:37:43 2015 +0200
+
+    [hkl] engine q refactoring
+    
+    this is just to use the n_x, n_y, n_z parameters in the mode
+    methods. This way the compiler catche the parameter error everywhere.
+    The only brittle part is contained in the mode constructor.
+
+ hkl/hkl-pseudoaxis-common-q-private.h        |  4 ----
+ hkl/hkl-pseudoaxis-common-q.c                | 32 ++++++++++++++++++++++------
+ hkl/hkl-pseudoaxis-common-readonly-private.h | 10 +++++++++
+ hkl/hkl-pseudoaxis-common-readonly.c         |  9 --------
+ 4 files changed, 36 insertions(+), 19 deletions(-)
+
+commit 2156fd6ea7e1c68b7e9d16eae70a55aec9aa209a
+Author: picca <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 23 15:41:05 2015 +0200
+
+    [hkl] eulerians engine reworked
+    
+    created an HklModeEulerians to expose in the structure the solutions
+    parameter. Use directly this parameter in the code instead of relying
+    on the parameter order available in the parameters vector.
+    this way we will catch mode errors during the build.
+
+ hkl/hkl-pseudoaxis-common-eulerians-private.h | 11 -----
+ hkl/hkl-pseudoaxis-common-eulerians.c         | 70 ++++++++++++++++-----------
+ 2 files changed, 42 insertions(+), 39 deletions(-)
+
+commit 9f6c34321f1be4fd1780dc57006738b79f9eb830
+Author: picca <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 23 10:01:43 2015 +0200
+
+    [hkl] use #define AXIS "axis"
+
+ Documentation/hkl.org.in              |   5 +-
+ hkl/hkl-engine-2c.c                   |  14 +--
+ hkl/hkl-engine-e4c.c                  |  74 +++++++--------
+ hkl/hkl-engine-e6c.c                  |  82 ++++++++---------
+ hkl/hkl-engine-k4c.c                  |  32 +++----
+ hkl/hkl-engine-k6c.c                  | 169 ++++++++++++++++++----------------
+ hkl/hkl-engine-petra3-p09-eh2.c       |  65 +++++++------
+ hkl/hkl-engine-soleil-sirius-turret.c |  34 ++++---
+ hkl/hkl-engine-soleil-sixs-med.c      |  97 +++++++++----------
+ hkl/hkl-engine-template.c             |  12 +--
+ hkl/hkl-engine-zaxis.c                |  30 +++---
+ 11 files changed, 321 insertions(+), 293 deletions(-)
+
+commit 873b91bd76162c06e5394f8612656acf7b8dd292
+Author: picca <picca at synchrotron-soleil.fr>
+Date:   Wed Apr 22 15:32:19 2015 +0200
+
+    [hkl] comments
+
+ hkl/hkl-engine-e4c.c |  8 ++++----
+ hkl/hkl-engine-e6c.c | 20 ++++++--------------
+ hkl/hkl-engine-k6c.c | 10 +++++++---
+ 3 files changed, 17 insertions(+), 21 deletions(-)
+
+commit a0d493ba697cc6d075a482a40109db5844355f23
+Author: picca <picca at synchrotron-soleil.fr>
+Date:   Wed Apr 22 15:19:02 2015 +0200
+
+    [hkl] add the incidence pseudo axis engine
+
+ Documentation/Makefile.am                    |   2 +-
+ Documentation/hkl.org.in                     |   9 +-
+ hkl/Makefile.am                              |   2 +
+ hkl/hkl-engine-e4c.c                         |  21 ++-
+ hkl/hkl-engine-e6c.c                         |  17 +++
+ hkl/hkl-engine-k4c.c                         |  15 ++
+ hkl/hkl-engine-k6c.c                         | 197 ++++++++++++++-------------
+ hkl/hkl-engine-soleil-sirius-turret.c        |  16 ++-
+ hkl/hkl-engine-soleil-sixs-med.c             |  21 +++
+ hkl/hkl-engine-template.c                    |  10 ++
+ hkl/hkl-engine-zaxis.c                       |  13 ++
+ hkl/hkl-pseudoaxis-common-hkl-private.h      |  22 +--
+ hkl/hkl-pseudoaxis-common-q.c                |  17 +--
+ hkl/hkl-pseudoaxis-common-readonly-private.h |  78 +++++++++++
+ hkl/hkl-pseudoaxis-common-readonly.c         | 183 +++++++++++++++++++++++++
+ hkl/hkl-pseudoaxis-private.h                 |  14 +-
+ tests/bindings/python.py                     |   3 +-
+ tests/hkl-pseudoaxis-t.c                     |   7 +-
+ 18 files changed, 506 insertions(+), 141 deletions(-)
+
+commit be0c3a16220d6479603422d75f35dce8510273c7
+Author: Picca Frédéric-Emmanuel <picca at debian.org>
+Date:   Fri Apr 3 19:36:38 2015 +0200
+
+    [todo] optimisation idea for the hkl_engine_prepare_internal method
+
+ Documentation/hkl.org.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 6bbcfc91989957c8cc585a99fdd640e0067dcfd7
+Author: Picca Frédéric-Emmanuel <picca at debian.org>
+Date:   Fri Apr 3 19:32:46 2015 +0200
+
+    [buildsystem] rename editdoc and showdoc -> doc-edit and doc-show
+    
+    Use also the sensible-browser instead of hardcoding iceweasel.
+
+ Documentation/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit e3b29200acae81876a9beff38ddd027a95b03483
+Author: Picca Frédéric-Emmanuel <picca at debian.org>
+Date:   Fri Apr 3 19:22:33 2015 +0200
+
+    [doc] document the new tth2 engine
+
+ Documentation/hkl.org.in | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+commit 735565dc1d60b5c98620a279fc044d416d8cdd88
+Author: Picca Frédéric-Emmanuel <picca at debian.org>
+Date:   Fri Apr 3 18:54:15 2015 +0200
+
+    [contrib] generic computeHkl method
+
+ contrib/hkl.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 39fa20e107043f13e56960707eccbe51fe5a8dfa
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 15:06:07 2015 +0200
+
+    [hkl] finale step, pseudo axes are shared between engines.
+
+ hkl/hkl-pseudoaxis-private.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 81f0582b6f95e2977b1ebc8f6ca693eae4788f8d
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 12:00:41 2015 +0200
+
+    [tests] another memory leak
+
+ tests/hkl-pseudoaxis-t.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 030a32b32a821a82d74aa0c94fcd3f8d6912f065
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 11:52:47 2015 +0200
+
+    [hkl] transfer the ownership of the pseudo axes into the HklEngineList
+
+ hkl/hkl-pseudoaxis-private.h | 23 ++++++++++-------------
+ 1 file changed, 10 insertions(+), 13 deletions(-)
+
+commit c0946ae7eb734f0ec8386bbfc42aa821ec9d2726
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 11:42:19 2015 +0200
+
+    [tests] memory leak
+
+ tests/hkl-bench-t.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit fe9d31105d0e0871b78fb7c672e729775b8e2473
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 10:47:59 2015 +0200
+
+    [hkl] no more hkl_engine_list_add method
+    
+    the logic was moved into the hkl_engine_init method.
+    The modification was done with a .cocci file.
+
+ hkl/hkl-engine-e4c.c                  | 18 +++++++++---------
+ hkl/hkl-engine-e6c.c                  | 10 +++++-----
+ hkl/hkl-engine-k4c.c                  |  8 ++++----
+ hkl/hkl-engine-k6c.c                  | 24 ++++++++++++------------
+ hkl/hkl-engine-petra3-p09-eh2.c       |  2 +-
+ hkl/hkl-engine-soleil-sirius-turret.c |  8 ++++----
+ hkl/hkl-engine-soleil-sixs-med.c      | 24 ++++++++++++------------
+ hkl/hkl-engine-template.c             | 10 +++++-----
+ hkl/hkl-engine-zaxis.c                |  8 ++++----
+ hkl/hkl-pseudoaxis-private.h          | 24 ++----------------------
+ scripts/enginelist.cocci              |  6 ++++++
+ 11 files changed, 64 insertions(+), 78 deletions(-)
+
+commit f1faf7aa8f071d76fe1a9022a314ba14aeb58778
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Fri Apr 3 10:26:15 2015 +0200
+
+    [hkl] set the engines in the hkl_engine_init method.
+    
+    the idea is to remove the hkl_engine_list_add method which is
+    redundant with the HklEngine constructor.
+    the HklEngine is just an internal thing with no existance without
+    an HklEngineList.
+
+ hkl/hkl-pseudoaxis-common-eulerians.c |  2 +-
+ hkl/hkl-pseudoaxis-common-hkl.c       |  2 +-
+ hkl/hkl-pseudoaxis-common-psi.c       |  2 +-
+ hkl/hkl-pseudoaxis-common-q.c         |  6 +++---
+ hkl/hkl-pseudoaxis-common-tth.c       |  2 +-
+ hkl/hkl-pseudoaxis-private.h          | 10 ++++------
+ hkl/hkl-pseudoaxis.c                  |  5 -----
+ 7 files changed, 11 insertions(+), 18 deletions(-)
+
+commit 312125d4a965072d3d01dde79923f9d575bf67df
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 2 16:42:44 2015 +0200
+
+    [hkl] prepare for common storage of pseudo_axes
+    
+    now the engine_list is provided to the HklEngine constructor.
+    This way it will be possible to share pseudo_axies between multiple
+    HklEngine, by storing the peudo axes into the HklEngineList.
+    
+    the modification is not yet done. But this was the first step.
+
+ hkl/hkl-engine-e4c.c                          | 26 ++++++++---------
+ hkl/hkl-engine-e6c.c                          | 18 ++++++------
+ hkl/hkl-engine-k4c.c                          | 16 +++++------
+ hkl/hkl-engine-k6c.c                          | 40 +++++++++++++--------------
+ hkl/hkl-engine-petra3-p09-eh2.c               |  6 ++--
+ hkl/hkl-engine-soleil-sirius-turret.c         | 12 ++++----
+ hkl/hkl-engine-soleil-sixs-med.c              | 36 ++++++++++++------------
+ hkl/hkl-engine-template.c                     | 18 ++++++------
+ hkl/hkl-engine-zaxis.c                        | 12 ++++----
+ hkl/hkl-pseudoaxis-common-eulerians-private.h |  4 +--
+ hkl/hkl-pseudoaxis-common-eulerians.c         |  8 +++---
+ hkl/hkl-pseudoaxis-common-hkl-private.h       |  2 +-
+ hkl/hkl-pseudoaxis-common-hkl.c               |  8 +++---
+ hkl/hkl-pseudoaxis-common-psi-private.h       |  2 +-
+ hkl/hkl-pseudoaxis-common-psi.c               |  4 +--
+ hkl/hkl-pseudoaxis-common-q-private.h         |  6 ++--
+ hkl/hkl-pseudoaxis-common-q.c                 | 16 +++++------
+ hkl/hkl-pseudoaxis-common-tth-private.h       |  2 +-
+ hkl/hkl-pseudoaxis-common-tth.c               |  6 ++--
+ hkl/hkl-pseudoaxis-private.h                  |  3 ++
+ 20 files changed, 124 insertions(+), 121 deletions(-)
+
+commit 85a010281dedb18132e58a954628d63f4795b468
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 2 13:51:33 2015 +0200
+
+    upgrading copyright year from 2014 to 2015
+
+ gui/hkl-gui-3d.c                              | 2 +-
+ gui/hkl-gui-3d.h                              | 2 +-
+ gui/hkl-gui-macros.h                          | 2 +-
+ gui/hkl-gui.c                                 | 2 +-
+ gui/hkl-gui.h                                 | 2 +-
+ hkl.h                                         | 2 +-
+ hkl/hkl-axis-private.h                        | 2 +-
+ hkl/hkl-axis.c                                | 2 +-
+ hkl/hkl-binding-private.h                     | 2 +-
+ hkl/hkl-binding.c                             | 2 +-
+ hkl/hkl-detector-factory.c                    | 2 +-
+ hkl/hkl-detector-private.h                    | 2 +-
+ hkl/hkl-detector.c                            | 2 +-
+ hkl/hkl-engine-2c.c                           | 2 +-
+ hkl/hkl-engine-e4c.c                          | 2 +-
+ hkl/hkl-engine-e6c.c                          | 2 +-
+ hkl/hkl-engine-k4c.c                          | 2 +-
+ hkl/hkl-engine-k6c.c                          | 2 +-
+ hkl/hkl-engine-petra3-p09-eh2.c               | 2 +-
+ hkl/hkl-engine-soleil-sirius-turret.c         | 2 +-
+ hkl/hkl-engine-soleil-sixs-med.c              | 2 +-
+ hkl/hkl-engine-template.c                     | 2 +-
+ hkl/hkl-engine-zaxis.c                        | 2 +-
+ hkl/hkl-factory-private.h                     | 2 +-
+ hkl/hkl-factory.c                             | 2 +-
+ hkl/hkl-geometry-private.h                    | 2 +-
+ hkl/hkl-geometry.c                            | 2 +-
+ hkl/hkl-interval-private.h                    | 2 +-
+ hkl/hkl-interval.c                            | 2 +-
+ hkl/hkl-lattice-private.h                     | 2 +-
+ hkl/hkl-lattice.c                             | 2 +-
+ hkl/hkl-macros-private.h                      | 2 +-
+ hkl/hkl-macros.c                              | 2 +-
+ hkl/hkl-matrix-private.h                      | 2 +-
+ hkl/hkl-matrix.c                              | 2 +-
+ hkl/hkl-parameter-private.h                   | 2 +-
+ hkl/hkl-parameter.c                           | 2 +-
+ hkl/hkl-pseudoaxis-auto-private.h             | 2 +-
+ hkl/hkl-pseudoaxis-auto.c                     | 2 +-
+ hkl/hkl-pseudoaxis-common-eulerians-private.h | 2 +-
+ hkl/hkl-pseudoaxis-common-eulerians.c         | 2 +-
+ hkl/hkl-pseudoaxis-common-hkl-private.h       | 2 +-
+ hkl/hkl-pseudoaxis-common-hkl.c               | 2 +-
+ hkl/hkl-pseudoaxis-common-psi-private.h       | 2 +-
+ hkl/hkl-pseudoaxis-common-psi.c               | 2 +-
+ hkl/hkl-pseudoaxis-common-q-private.h         | 2 +-
+ hkl/hkl-pseudoaxis-common-q.c                 | 2 +-
+ hkl/hkl-pseudoaxis-common-tth-private.h       | 2 +-
+ hkl/hkl-pseudoaxis-common-tth.c               | 2 +-
+ hkl/hkl-pseudoaxis-private.h                  | 2 +-
+ hkl/hkl-pseudoaxis.c                          | 2 +-
+ hkl/hkl-quaternion-private.h                  | 2 +-
+ hkl/hkl-quaternion.c                          | 2 +-
+ hkl/hkl-sample-private.h                      | 2 +-
+ hkl/hkl-sample.c                              | 2 +-
+ hkl/hkl-source-private.h                      | 2 +-
+ hkl/hkl-source.c                              | 2 +-
+ hkl/hkl-types.c                               | 2 +-
+ hkl/hkl-types.h                               | 2 +-
+ hkl/hkl-unit-private.h                        | 2 +-
+ hkl/hkl-unit.c                                | 2 +-
+ hkl/hkl-vector-private.h                      | 2 +-
+ hkl/hkl-vector.c                              | 2 +-
+ hkl3d/hkl3d.h                                 | 2 +-
+ tests/hkl-axis-t.c                            | 2 +-
+ tests/hkl-bench-t.c                           | 2 +-
+ tests/hkl-detector-t.c                        | 2 +-
+ tests/hkl-geometry-t.c                        | 2 +-
+ tests/hkl-interval-t.c                        | 2 +-
+ tests/hkl-lattice-t.c                         | 2 +-
+ tests/hkl-matrix-t.c                          | 2 +-
+ tests/hkl-parameter-t.c                       | 2 +-
+ tests/hkl-pseudoaxis-e4ch-t.c                 | 2 +-
+ tests/hkl-pseudoaxis-e4cv-t.c                 | 2 +-
+ tests/hkl-pseudoaxis-e6c-t.c                  | 2 +-
+ tests/hkl-pseudoaxis-k4cv-t.c                 | 2 +-
+ tests/hkl-pseudoaxis-k6c-t.c                  | 2 +-
+ tests/hkl-pseudoaxis-t.c                      | 2 +-
+ tests/hkl-pseudoaxis-zaxis-t.c                | 2 +-
+ tests/hkl-quaternion-t.c                      | 2 +-
+ tests/hkl-sample-t.c                          | 2 +-
+ tests/hkl-source-t.c                          | 2 +-
+ tests/hkl-unit-t.c                            | 2 +-
+ tests/hkl-vector-t.c                          | 2 +-
+ tests/hkl3d-test-t.c                          | 2 +-
+ tests/tap/hkl-tap.h                           | 2 +-
+ 86 files changed, 86 insertions(+), 86 deletions(-)
+
+commit cc6bf9537202a2d816039ae519797b5f909056b3
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 2 13:49:22 2015 +0200
+
+    [hkl] remove the HklPseudoAxis struct
+    
+    HklParameter is enough.
+
+ hkl/hkl-pseudoaxis-common-eulerians.c | 29 +++++++---------
+ hkl/hkl-pseudoaxis-common-hkl.c       | 35 +++++++++----------
+ hkl/hkl-pseudoaxis-common-psi.c       | 11 +++---
+ hkl/hkl-pseudoaxis-common-q.c         | 50 +++++++++++++--------------
+ hkl/hkl-pseudoaxis-common-tth.c       | 20 +++++------
+ hkl/hkl-pseudoaxis-private.h          | 65 ++---------------------------------
+ 6 files changed, 68 insertions(+), 142 deletions(-)
+
+commit 331d3174a48f1319131bf2c4ac5617d174403152
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Thu Apr 2 13:47:53 2015 +0200
+
+    add the tth2 engine
+
+ Documentation/hkl.org.in                |   6 +-
+ hkl/Makefile.am                         |   4 +-
+ hkl/hkl-engine-e6c.c                    |   4 +-
+ hkl/hkl-engine-k6c.c                    |   5 +-
+ hkl/hkl-engine-soleil-sirius-turret.c   |   4 +-
+ hkl/hkl-engine-soleil-sixs-med.c        |   6 +-
+ hkl/hkl-engine-template.c               |   4 +-
+ hkl/hkl-engine-zaxis.c                  |   4 +-
+ hkl/hkl-pseudoaxis-common-tth-private.h |  35 +++++++
+ hkl/hkl-pseudoaxis-common-tth.c         | 175 ++++++++++++++++++++++++++++++++
+ 10 files changed, 239 insertions(+), 8 deletions(-)
+
+commit 333621d583f778d33d6f55deb548f5d968554a27
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Tue Mar 24 17:01:04 2015 +0100
+
+    [hkl] expose hkl_sample_reflection_flag/geometry_get/set in the bindings
+
+ Documentation/hkl.org.in | 15 +++++++++++++++
+ hkl/hkl-sample.c         | 28 ++++++++++++++++------------
+ tests/bindings/python.py |  8 ++++++++
+ 3 files changed, 39 insertions(+), 12 deletions(-)
+
+commit 25a3bdb746bc486c3e88ef2a2f91ddb67e4d2b32
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Tue Mar 24 16:29:20 2015 +0100
+
+    [hkl] expose hkl_lattice_x_get/set in the bindings
+
+ Documentation/hkl.org.in |  3 +++
+ hkl/hkl-lattice.c        | 24 ++++++++++++------------
+ tests/bindings/python.py | 37 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 52 insertions(+), 12 deletions(-)
+
+commit b0457c7035737aeca188c31c2ce28931cd1c666b
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Tue Mar 24 14:39:23 2015 +0100
+
+    [hkl] add the hkl_engine_dependencies_get method
+
+ Documentation/Makefile.am             |  4 +++-
+ Documentation/hkl.org.in              | 24 ++++++++++++++++---
+ hkl.h                                 | 10 ++++++++
+ hkl/hkl-pseudoaxis-common-eulerians.c |  5 ++--
+ hkl/hkl-pseudoaxis-common-hkl.c       |  5 ++--
+ hkl/hkl-pseudoaxis-common-psi.c       |  5 ++--
+ hkl/hkl-pseudoaxis-common-q.c         | 15 +++++++-----
+ hkl/hkl-pseudoaxis-private.h          |  4 ++++
+ hkl/hkl-pseudoaxis.c                  | 15 ++++++++++++
+ tests/bindings/python.py              |  5 ++++
+ tests/hkl-pseudoaxis-t.c              | 44 +++++++++++++++++++++++++++++++----
+ 11 files changed, 116 insertions(+), 20 deletions(-)
+
+commit b8808b8745f54de2ab524016350a1dc55dbbdbb4
+Author: Picca Frédéric-Emmanuel <picca at debian.org>
+Date:   Tue Mar 10 20:34:43 2015 +0100
+
+    [contrib] add a commad line
+    
+    now it is possible to compute any hkl coordinates with
+    
+    hkl ca h k l
+
+ contrib/hkl.hs | 58 +++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 45 insertions(+), 13 deletions(-)
+
+commit 9c2539c8dcb83ce5feada415d70b473982759bd1
+Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+Date:   Tue Mar 10 17:01:45 2015 +0100
+
+    [hkl] add the hkl_lattice_volume_get
+    
+    update also the hkl_lattice_x_set to compute the volume.
+
+ Documentation/hkl.org.in  | 26 ++++++++++++++++--
+ hkl.h                     |  2 ++
+ hkl/hkl-lattice-private.h |  1 +
+ hkl/hkl-lattice.c         | 69 +++++++++++++++++++++++++++++++++--------------
+ tests/bindings/python.py  |  3 +++
+ tests/hkl-lattice-t.c     | 27 +++++++++++++++++--
+ 6 files changed, 104 insertions(+), 24 deletions(-)
+
 commit 0d6317eaad135a726cd30005bf64a8182349f06f
 Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
 Date:   Mon Mar 9 09:07:32 2015 +0100
diff --git a/Documentation/Makefile.am b/Documentation/Makefile.am
index ab33477..c8b2b77 100644
--- a/Documentation/Makefile.am
+++ b/Documentation/Makefile.am
@@ -9,16 +9,18 @@ dist_html_DATA=hkl.html
 hkl.html: hkl.org $(srcdir)/default.el
 	env GI_TYPELIB_PATH=$(top_builddir)/hkl \
 	$(LIBTOOL) --mode=execute -dlopen $(AM_LDFLAGS) \
-	$(EMACS) $< --batch -q --load $(srcdir)/default.el -f org-html-export-to-html --kill
+	$(EMACS) $< --batch -q --load $(srcdir)/default.el -f org-html-export-to-html --debug-init --kill
 
 EXTRA_DIST=default.el
 
 CLEANFILES=hkl.html
 
-editdoc:
+doc-edit:
 	env GI_TYPELIB_PATH=$(top_builddir)/hkl \
 	$(LIBTOOL) --mode=execute -dlopen $(AM_LDFLAGS) \
 	$(EMACS) hkl.org.in -q --load $(srcdir)/default.el
 
+doc-show: hkl.html
+	sensible-browser $(builddir)/hkl.html
 
-.PHONY: editdoc
+.PHONY: doc-edit doc-show
diff --git a/Documentation/Makefile.in b/Documentation/Makefile.in
index c1bb822..8e06388 100644
--- a/Documentation/Makefile.in
+++ b/Documentation/Makefile.in
@@ -764,14 +764,17 @@ uninstall-man: uninstall-man1
 hkl.html: hkl.org $(srcdir)/default.el
 	env GI_TYPELIB_PATH=$(top_builddir)/hkl \
 	$(LIBTOOL) --mode=execute -dlopen $(AM_LDFLAGS) \
-	$(EMACS) $< --batch -q --load $(srcdir)/default.el -f org-html-export-to-html --kill
+	$(EMACS) $< --batch -q --load $(srcdir)/default.el -f org-html-export-to-html --debug-init --kill
 
-editdoc:
+doc-edit:
 	env GI_TYPELIB_PATH=$(top_builddir)/hkl \
 	$(LIBTOOL) --mode=execute -dlopen $(AM_LDFLAGS) \
 	$(EMACS) hkl.org.in -q --load $(srcdir)/default.el
 
-.PHONY: editdoc
+doc-show: hkl.html
+	sensible-browser $(builddir)/hkl.html
+
+.PHONY: doc-edit doc-show
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Documentation/api/html/api-index-full.html b/Documentation/api/html/api-index-full.html
index ab4b07d..c8c523d 100644
--- a/Documentation/api/html/api-index-full.html
+++ b/Documentation/api/html/api-index-full.html
@@ -167,6 +167,10 @@
 </dt>
 <dd></dd>
 <dt>
+cmp, user_function in htable
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-compiler.html#COLD:CAPS" title="COLD">COLD</a>, macro in <a class="link" href="hkl-compiler.html" title="compiler">compiler</a>
 </dt>
 <dd></dd>
@@ -296,7 +300,7 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-darray.html#darray-item" title="darray_item()">darray_item</a>, macro in <a class="link" href="hkl-darray.html" title="darray">darray</a>
+<a class="link" href="hkl-darray.html#darray-item" title="darray_item ()">darray_item</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
 <dt>
@@ -436,7 +440,7 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-parameter-private.html#dup" title="dup">dup</a>, variable in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
+<a class="link" href="hkl-hkl-parameter-private.html#dup" title="dup">dup</a>, variable in <a class="link" href="hkl-hkl-parameter-private.html" title="hkl-parameter-private">hkl-parameter-private</a>
 </dt>
 <dd></dd>
 <a name="idxE"></a><h3 class="title">E</h3>
@@ -453,11 +457,11 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-private.html#HklEngineError" title="enum HklEngineError">HklEngineError</a>, enum in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
+<a class="link" href="hkl-hkl.html#HklEngineDependencies" title="enum HklEngineDependencies">HklEngineDependencies</a>, enum in <a class="link" href="hkl-hkl.html" title="hkl">hkl</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#HklEngineEulerians" title="struct HklEngineEulerians">HklEngineEulerians</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html" title="hkl-pseudoaxis-common-eulerians-private">hkl-pseudoaxis-common-eulerians-private</a>
+<a class="link" href="hkl-hkl-pseudoaxis-private.html#HklEngineError" title="enum HklEngineError">HklEngineError</a>, enum in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
 <dt>
@@ -485,27 +489,27 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ" title="HklEngineQ">HklEngineQ</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html" title="hkl-pseudoaxis-common-q-private">hkl-pseudoaxis-common-q-private</a>
+HklEngineTth2, struct in hkl-pseudoaxis-common-tth-private
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ2" title="HklEngineQ2">HklEngineQ2</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html" title="hkl-pseudoaxis-common-q-private">hkl-pseudoaxis-common-q-private</a>
+<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-ERROR:CAPS" title="HKL_ENGINE_ERROR">HKL_ENGINE_ERROR</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQperQpar" title="HklEngineQperQpar">HklEngineQperQpar</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html" title="hkl-pseudoaxis-common-q-private">hkl-pseudoaxis-common-q-private</a>
+<a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new" title="hkl_engine_eulerians_new ()">hkl_engine_eulerians_new</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html" title="hkl-pseudoaxis-common-eulerians-private">hkl-pseudoaxis-common-eulerians-private</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-ERROR:CAPS" title="HKL_ENGINE_ERROR">HKL_ENGINE_ERROR</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
+<a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#hkl-engine-hkl-new" title="hkl_engine_hkl_new ()">hkl_engine_hkl_new</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html" title="hkl-pseudoaxis-common-hkl-private">hkl-pseudoaxis-common-hkl-private</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new" title="hkl_engine_eulerians_new ()">hkl_engine_eulerians_new</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html" title="hkl-pseudoaxis-common-eulerians-private">hkl-pseudoaxis-common-eulerians-private</a>
+hkl_engine_incidence_new, function in hkl-pseudoaxis-common-readonly-private
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#hkl-engine-hkl-new" title="hkl_engine_hkl_new ()">hkl_engine_hkl_new</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html" title="hkl-pseudoaxis-common-hkl-private">hkl-pseudoaxis-common-hkl-private</a>
+<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-INFO:CAPS" title="HKL_ENGINE_INFO()">HKL_ENGINE_INFO</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
 <dt>
@@ -533,6 +537,10 @@
 </dt>
 <dd></dd>
 <dt>
+hkl_engine_tth2_new, function in hkl-pseudoaxis-common-tth-private
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl.html#HKL-EPSILON:CAPS" title="HKL_EPSILON">HKL_EPSILON</a>, macro in <a class="link" href="hkl-hkl.html" title="hkl">hkl</a>
 </dt>
 <dd></dd>
@@ -700,6 +708,70 @@
 <dd></dd>
 <a name="idxH"></a><h3 class="title">H</h3>
 <dt>
+hash, macro in hash
+</dt>
+<dd></dd>
+<dt>
+hash64, macro in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_any, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_stable, macro in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_stable_16, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_stable_32, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_stable_64, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash64_stable_8, function in hash
+</dt>
+<dd></dd>
+<dt>
+hashl, macro in hash
+</dt>
+<dd></dd>
+<dt>
+hash_any, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash_stable, macro in hash
+</dt>
+<dd></dd>
+<dt>
+hash_stable_16, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash_stable_32, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash_stable_64, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash_stable_8, function in hash
+</dt>
+<dd></dd>
+<dt>
+hash_u32, function in hash
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-geometry-private.html#HklHolder" title="struct HklHolder">HklHolder</a>, struct in <a class="link" href="hkl-hkl-geometry-private.html" title="hkl-geometry-private">hkl-geometry-private</a>
 </dt>
 <dd></dd>
@@ -707,6 +779,58 @@
 <a class="link" href="hkl-hkl-geometry-private.html#hkl-holder-add-rotation-axis" title="hkl_holder_add_rotation_axis ()">hkl_holder_add_rotation_axis</a>, function in <a class="link" href="hkl-hkl-geometry-private.html" title="hkl-geometry-private">hkl-geometry-private</a>
 </dt>
 <dd></dd>
+<dt>
+htable_add, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_clear, function in htable
+</dt>
+<dd></dd>
+<dt>
+HTABLE_DEFINE_TYPE, macro in htable_type
+</dt>
+<dd></dd>
+<dt>
+htable_del, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_delval, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_first, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_firstval, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_init, function in htable
+</dt>
+<dd></dd>
+<dt>
+HTABLE_INITIALIZER, macro in htable
+</dt>
+<dd></dd>
+<dt>
+HTABLE_KTYPE, macro in htable_type
+</dt>
+<dd></dd>
+<dt>
+htable_next, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_nextval, function in htable
+</dt>
+<dd></dd>
+<dt>
+htable_rehash, function in htable
+</dt>
+<dd></dd>
 <a name="idxI"></a><h3 class="title">I</h3>
 <dt>
 <a class="link" href="hkl-hkl-pseudoaxis-private.html#i" title="i">i</a>, variable in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
@@ -1084,6 +1208,10 @@
 </dt>
 <dd></dd>
 <dt>
+HklModeIncidence, struct in hkl-pseudoaxis-common-readonly-private
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklModeInfo" title="struct HklModeInfo">HklModeInfo</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
@@ -1128,10 +1256,22 @@
 </dt>
 <dd></dd>
 <dt>
+hkl_mode_incidence_new, function in hkl-pseudoaxis-common-readonly-private
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO:CAPS" title="HKL_MODE_INFO()">HKL_MODE_INFO</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO:CAPS" title="HKL_MODE_INFO_RO()">HKL_MODE_INFO_RO</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO-WITH-PARAMS:CAPS" title="HKL_MODE_INFO_RO_WITH_PARAMS()">HKL_MODE_INFO_RO_WITH_PARAMS</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-WITH-PARAMS:CAPS" title="HKL_MODE_INFO_WITH_PARAMS()">HKL_MODE_INFO_WITH_PARAMS</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
 </dt>
 <dd></dd>
@@ -1222,10 +1362,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS" title="HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS">HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="hkl-hkl-parameter-private.html#hkl-parameter-value-get-closest" title="hkl_parameter_value_get_closest ()">hkl_parameter_value_get_closest</a>, function in <a class="link" href="hkl-hkl-parameter-private.html" title="hkl-parameter-private">hkl-parameter-private</a>
 </dt>
 <dd></dd>
@@ -1242,14 +1378,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="hkl-hkl-pseudoaxis-private.html#HklPseudoAxis" title="struct HklPseudoAxis">HklPseudoAxis</a>, struct in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="hkl-hkl-pseudoaxis-private.html#pseudo-axis" title="pseudo_axis">pseudo_axis</a>, variable in <a class="link" href="hkl-hkl-pseudoaxis-private.html" title="hkl-pseudoaxis-private">hkl-pseudoaxis-private</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#PSI-CONSTANT-PARAMETERS:CAPS" title="PSI_CONSTANT_PARAMETERS()">PSI_CONSTANT_PARAMETERS</a>, macro in <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html" title="hkl-pseudoaxis-common-hkl-private">hkl-pseudoaxis-common-hkl-private</a>
 </dt>
 <dd></dd>
@@ -1372,6 +1500,10 @@
 </dt>
 <dd></dd>
 <dt>
+rehash, user_function in htable
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#RUBh-minus-Q" title="RUBh_minus_Q ()">RUBh_minus_Q</a>, function in <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html" title="hkl-pseudoaxis-common-hkl-private">hkl-pseudoaxis-common-hkl-private</a>
 </dt>
 <dd></dd>
@@ -1586,6 +1718,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-DEPENDENCIES:CAPS" title="HKL_TYPE_ENGINE_DEPENDENCIES">HKL_TYPE_ENGINE_DEPENDENCIES</a>, macro in <a class="link" href="hkl-hkl-type-builtins.html" title="hkl-type-builtins">hkl-type-builtins</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="hkl-hkl-types.html#TYPE-HKL-DETECTOR:CAPS" title="TYPE_HKL_DETECTOR">TYPE_HKL_DETECTOR</a>, macro in <a class="link" href="hkl-hkl-types.html" title="hkl-types">hkl-types</a>
 </dt>
 <dd></dd>
diff --git a/Documentation/api/html/ch01.html b/Documentation/api/html/ch01.html
index 2009da9..1df0f4b 100644
--- a/Documentation/api/html/ch01.html
+++ b/Documentation/api/html/ch01.html
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="idp2091656"></a>[Insert title here]</h2></div></div></div>
+<a name="idp17668000"></a>[Insert title here]</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="hkl-array-size.html">array_size</a></span><span class="refpurpose"></span>
diff --git a/Documentation/api/html/hkl-darray.html b/Documentation/api/html/hkl-darray.html
index 67a8597..e235cc2 100644
--- a/Documentation/api/html/hkl-darray.html
+++ b/Documentation/api/html/hkl-darray.html
@@ -76,8 +76,7 @@ typedef             <a class="link" href="hkl-darray.html#darray-char" title="da
                                                          need)
 #define             <a class="link" href="hkl-darray.html#darray-init" title="darray_init()">darray_init</a>                         (arr)
 typedef             <a class="link" href="hkl-darray.html#darray-int" title="darray_int">darray_int</a>;
-#define             <a class="link" href="hkl-darray.html#darray-item" title="darray_item()">darray_item</a>                         (arr,
-                                                         i)
+<span class="returnvalue">return</span>              <a class="link" href="hkl-darray.html#darray-item" title="darray_item ()">darray_item</a>                         ();
 typedef             <a class="link" href="hkl-darray.html#darray-long" title="darray_long">darray_long</a>;
 #define             <a class="link" href="hkl-darray.html#darray-make-room" title="darray_make_room()">darray_make_room</a>                    (arr,
                                                          room)
@@ -243,9 +242,8 @@ typedef             <a class="link" href="hkl-darray.html#darray-ushort" title="
 </div>
 <hr>
 <div class="refsect2">
-<a name="darray-item"></a><h3>darray_item()</h3>
-<pre class="programlisting">#define darray_item(arr, i) ((arr).item[i])
-</pre>
+<a name="darray-item"></a><h3>darray_item ()</h3>
+<pre class="programlisting"><span class="returnvalue">return</span>              darray_item                         ();</pre>
 </div>
 <hr>
 <div class="refsect2">
diff --git a/Documentation/api/html/hkl-hkl-lattice-private.html b/Documentation/api/html/hkl-hkl-lattice-private.html
index b2c6a53..297ba0c 100644
--- a/Documentation/api/html/hkl-hkl-lattice-private.html
+++ b/Documentation/api/html/hkl-hkl-lattice-private.html
@@ -68,6 +68,7 @@ enum                <a class="link" href="hkl-hkl-lattice-private.html#HklLattic
 	HklParameter *alpha;
 	HklParameter *beta;
 	HklParameter *gamma;
+	HklParameter *volume;
 } HklLattice;
 </pre>
 </div>
diff --git a/Documentation/api/html/hkl-hkl-parameter-private.html b/Documentation/api/html/hkl-hkl-parameter-private.html
index b41c9ca..028d942 100644
--- a/Documentation/api/html/hkl-hkl-parameter-private.html
+++ b/Documentation/api/html/hkl-hkl-parameter-private.html
@@ -46,7 +46,7 @@ enum                <a class="link" href="hkl-hkl-parameter-private.html#HklPara
 struct              <a class="link" href="hkl-hkl-parameter-private.html#HklParameterOperations" title="struct HklParameterOperations">HklParameterOperations</a>;
 double              <a class="link" href="hkl-hkl-parameter-private.html#alea" title="alea">alea</a>;
 typedef             <a class="link" href="hkl-hkl-parameter-private.html#darray-parameter" title="darray_parameter">darray_parameter</a>;
-HklPseudoAxis *     <a class="link" href="hkl-hkl-parameter-private.html#dup" title="dup">dup</a>;
+HklParameter *      <a class="link" href="hkl-hkl-parameter-private.html#dup" title="dup">dup</a>;
 double              <a class="link" href="hkl-hkl-parameter-private.html#factor" title="factor">factor</a>;
 <span class="returnvalue">else</span>                <a class="link" href="hkl-hkl-parameter-private.html#fprintf" title="fprintf ()">fprintf</a>                             (<em class="parameter"><code><span class="type">f</span> Param1</code></em>);
 <span class="returnvalue">return</span>              <a class="link" href="hkl-hkl-geometry-private.html#g-quark-from-static-string" title="g_quark_from_static_string ()">g_quark_from_static_string</a>          ();
@@ -158,7 +158,7 @@ double              <a class="link" href="hkl-hkl-parameter-private.html#factor"
 <hr>
 <div class="refsect2">
 <a name="dup"></a><h3>dup</h3>
-<pre class="programlisting">	HklPseudoAxis *dup = HKL_MALLOC(HklPseudoAxis);
+<pre class="programlisting">	HklParameter *dup = HKL_MALLOC(HklParameter);
 </pre>
 </div>
 <hr>
diff --git a/Documentation/api/html/hkl-hkl-pseudoaxis-common-eulerians-private.html b/Documentation/api/html/hkl-hkl-pseudoaxis-common-eulerians-private.html
index 184cf6b..281714a 100644
--- a/Documentation/api/html/hkl-hkl-pseudoaxis-common-eulerians-private.html
+++ b/Documentation/api/html/hkl-hkl-pseudoaxis-common-eulerians-private.html
@@ -37,8 +37,7 @@
 </tr></table></div>
 <div class="refsynopsisdiv">
 <a name="hkl-hkl-pseudoaxis-common-eulerians-private.synopsis"></a><h2>Synopsis</h2>
-<pre class="synopsis">struct              <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#HklEngineEulerians" title="struct HklEngineEulerians">HklEngineEulerians</a>;
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new" title="hkl_engine_eulerians_new ()">hkl_engine_eulerians_new</a>            (<em class="parameter"><code><span class="type">void</span></code></em>);
+<pre class="synopsis"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new" title="hkl_engine_eulerians_new ()">hkl_engine_eulerians_new</a>            (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
 <span class="returnvalue">void</span>                <a class="link" href="hkl-hkl-pseudoaxis-common-eulerians-private.html#kappa-2-kappap" title="kappa_2_kappap ()">kappa_2_kappap</a>                      (<em class="parameter"><code><span class="type">double</span> komega</code></em>,
                                                          <em class="parameter"><code><span class="type">double</span> kappa</code></em>,
                                                          <em class="parameter"><code><span class="type">double</span> kphi</code></em>,
@@ -54,19 +53,8 @@
 <div class="refsect1">
 <a name="hkl-hkl-pseudoaxis-common-eulerians-private.details"></a><h2>Details</h2>
 <div class="refsect2">
-<a name="HklEngineEulerians"></a><h3>struct HklEngineEulerians</h3>
-<pre class="programlisting">struct HklEngineEulerians {
-	HklParameter *omega;
-	HklParameter *chi;
-	HklParameter *phi;
-	HklEngine engine;
-};
-</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="hkl-engine-eulerians-new"></a><h3>hkl_engine_eulerians_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_eulerians_new            (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_eulerians_new            (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
diff --git a/Documentation/api/html/hkl-hkl-pseudoaxis-common-hkl-private.html b/Documentation/api/html/hkl-hkl-pseudoaxis-common-hkl-private.html
index 8d44caa..3784af7 100644
--- a/Documentation/api/html/hkl-hkl-pseudoaxis-common-hkl-private.html
+++ b/Documentation/api/html/hkl-hkl-pseudoaxis-common-hkl-private.html
@@ -47,7 +47,7 @@ struct              <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.
 <span class="returnvalue">int</span>                 <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#RUBh-minus-Q" title="RUBh_minus_Q ()">RUBh_minus_Q</a>                        (<em class="parameter"><code><span class="type">double</span> const x[]</code></em>,
                                                          <em class="parameter"><code><span class="type">void</span> *params</code></em>,
                                                          <em class="parameter"><code><span class="type">double</span> f[]</code></em>);
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#hkl-engine-hkl-new" title="hkl_engine_hkl_new ()">hkl_engine_hkl_new</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
+<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#hkl-engine-hkl-new" title="hkl_engine_hkl_new ()">hkl_engine_hkl_new</a>                  (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
 <span class="returnvalue">int</span>                 <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.html#hkl-mode-get-hkl-real" title="hkl_mode_get_hkl_real ()">hkl_mode_get_hkl_real</a>               (<em class="parameter"><code><a class="link" href="hkl-hkl-pseudoaxis-private.html#HklMode" title="struct HklMode"><span class="type">HklMode</span></a> *self</code></em>,
                                                          <em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="type">HklEngine</span></a> *engine</code></em>,
                                                          <em class="parameter"><code><a class="link" href="hkl-hkl.html#HklGeometry" title="HklGeometry"><span class="type">HklGeometry</span></a> *geometry</code></em>,
@@ -110,7 +110,7 @@ struct              <a class="link" href="hkl-hkl-pseudoaxis-common-hkl-private.
 <hr>
 <div class="refsect2">
 <a name="hkl-engine-hkl-new"></a><h3>hkl_engine_hkl_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_hkl_new                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_hkl_new                  (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
diff --git a/Documentation/api/html/hkl-hkl-pseudoaxis-common-psi-private.html b/Documentation/api/html/hkl-hkl-pseudoaxis-common-psi-private.html
index 03e7d90..ad19a6e 100644
--- a/Documentation/api/html/hkl-hkl-pseudoaxis-common-psi-private.html
+++ b/Documentation/api/html/hkl-hkl-pseudoaxis-common-psi-private.html
@@ -39,7 +39,7 @@
 <a name="hkl-hkl-pseudoaxis-common-psi-private.synopsis"></a><h2>Synopsis</h2>
 <pre class="synopsis">struct              <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.html#HklEnginePsi" title="struct HklEnginePsi">HklEnginePsi</a>;
 struct              <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.html#HklModePsi" title="struct HklModePsi">HklModePsi</a>;
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.html#hkl-engine-psi-new" title="hkl_engine_psi_new ()">hkl_engine_psi_new</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
+<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.html#hkl-engine-psi-new" title="hkl_engine_psi_new ()">hkl_engine_psi_new</a>                  (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
 <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklMode" title="struct HklMode"><span class="returnvalue">HklMode</span></a> *           <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.html#hkl-mode-psi-new" title="hkl_mode_psi_new ()">hkl_mode_psi_new</a>                    (<em class="parameter"><code>const <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#HklModeAutoInfo" title="struct HklModeAutoInfo"><span class="type">HklModeAutoInfo</span></a> *info</cod [...]
 </pre>
 </div>
@@ -69,7 +69,7 @@ struct              <a class="link" href="hkl-hkl-pseudoaxis-common-psi-private.
 <hr>
 <div class="refsect2">
 <a name="hkl-engine-psi-new"></a><h3>hkl_engine_psi_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_psi_new                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_psi_new                  (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
diff --git a/Documentation/api/html/hkl-hkl-pseudoaxis-common-q-private.html b/Documentation/api/html/hkl-hkl-pseudoaxis-common-q-private.html
index 44c1dc5..922ec9c 100644
--- a/Documentation/api/html/hkl-hkl-pseudoaxis-common-q-private.html
+++ b/Documentation/api/html/hkl-hkl-pseudoaxis-common-q-private.html
@@ -37,12 +37,9 @@
 </tr></table></div>
 <div class="refsynopsisdiv">
 <a name="hkl-hkl-pseudoaxis-common-q-private.synopsis"></a><h2>Synopsis</h2>
-<pre class="synopsis">                    <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ" title="HklEngineQ">HklEngineQ</a>;
-                    <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ2" title="HklEngineQ2">HklEngineQ2</a>;
-                    <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQperQpar" title="HklEngineQperQpar">HklEngineQperQpar</a>;
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q2-new" title="hkl_engine_q2_new ()">hkl_engine_q2_new</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q-new" title="hkl_engine_q_new ()">hkl_engine_q_new</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
-<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-qper-qpar-new" title="hkl_engine_qper_qpar_new ()">hkl_engine_qper_qpar_new</a>            (<em class="parameter"><code><span class="type">void</span></code></em>);
+<pre class="synopsis"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q2-new" title="hkl_engine_q2_new ()">hkl_engine_q2_new</a>                   (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
+<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q-new" title="hkl_engine_q_new ()">hkl_engine_q_new</a>                    (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
+<a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-qper-qpar-new" title="hkl_engine_qper_qpar_new ()">hkl_engine_qper_qpar_new</a>            (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);
 <span class="returnvalue">double</span>              <a class="link" href="hkl-hkl-pseudoaxis-common-q-private.html#qmax" title="qmax ()">qmax</a>                                (<em class="parameter"><code><span class="type">double</span> wavelength</code></em>);
 </pre>
 </div>
@@ -52,33 +49,18 @@
 <div class="refsect1">
 <a name="hkl-hkl-pseudoaxis-common-q-private.details"></a><h2>Details</h2>
 <div class="refsect2">
-<a name="HklEngineQ"></a><h3>HklEngineQ</h3>
-<pre class="programlisting">typedef struct _HklEngineQ HklEngineQ;</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="HklEngineQ2"></a><h3>HklEngineQ2</h3>
-<pre class="programlisting">typedef struct _HklEngineQ2 HklEngineQ2;</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="HklEngineQperQpar"></a><h3>HklEngineQperQpar</h3>
-<pre class="programlisting">typedef struct _HklEngineQperQpar HklEngineQperQpar;</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="hkl-engine-q2-new"></a><h3>hkl_engine_q2_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_q2_new                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_q2_new                   (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
 <a name="hkl-engine-q-new"></a><h3>hkl_engine_q_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_q_new                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_q_new                    (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
 <a name="hkl-engine-qper-qpar-new"></a><h3>hkl_engine_qper_qpar_new ()</h3>
-<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_qper_qpar_new            (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<pre class="programlisting"><a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine"><span class="returnvalue">HklEngine</span></a> *         hkl_engine_qper_qpar_new            (<em class="parameter"><code><a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList"><span class="type">HklEngineList</span></a> *engines</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
diff --git a/Documentation/api/html/hkl-hkl-pseudoaxis-private.html b/Documentation/api/html/hkl-hkl-pseudoaxis-private.html
index 8389d20..4a3d6a9 100644
--- a/Documentation/api/html/hkl-hkl-pseudoaxis-private.html
+++ b/Documentation/api/html/hkl-hkl-pseudoaxis-private.html
@@ -38,17 +38,24 @@
 <div class="refsynopsisdiv">
 <a name="hkl-hkl-pseudoaxis-private.synopsis"></a><h2>Synopsis</h2>
 <pre class="synopsis">#define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-ERROR:CAPS" title="HKL_ENGINE_ERROR">HKL_ENGINE_ERROR</a>
+#define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-INFO:CAPS" title="HKL_ENGINE_INFO()">HKL_ENGINE_INFO</a>                     (_name,
+                                                         _pseudo_axes,
+                                                         _dependencies)
 #define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-LIST-ERROR:CAPS" title="HKL_ENGINE_LIST_ERROR">HKL_ENGINE_LIST_ERROR</a>
 #define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-OPERATIONS-DEFAULTS:CAPS" title="HKL_ENGINE_OPERATIONS_DEFAULTS">HKL_ENGINE_OPERATIONS_DEFAULTS</a>
 #define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO:CAPS" title="HKL_MODE_INFO()">HKL_MODE_INFO</a>                       (_name,
                                                          _axes_r,
                                                          _axes_w)
+#define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO:CAPS" title="HKL_MODE_INFO_RO()">HKL_MODE_INFO_RO</a>                    (_name,
+                                                         _axes)
+#define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO-WITH-PARAMS:CAPS" title="HKL_MODE_INFO_RO_WITH_PARAMS()">HKL_MODE_INFO_RO_WITH_PARAMS</a>        (_name,
+                                                         _axes,
+                                                         _parameters)
 #define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-WITH-PARAMS:CAPS" title="HKL_MODE_INFO_WITH_PARAMS()">HKL_MODE_INFO_WITH_PARAMS</a>           (_name,
                                                          _axes_r,
                                                          _axes_w,
                                                          _parameters)
 #define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-MODE-OPERATIONS-DEFAULTS:CAPS" title="HKL_MODE_OPERATIONS_DEFAULTS">HKL_MODE_OPERATIONS_DEFAULTS</a>
-#define             <a class="link" href="hkl-hkl-pseudoaxis-private.html#HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS" title="HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS">HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS</a>
                     <a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine">HklEngine</a>;
 enum                <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklEngineError" title="enum HklEngineError">HklEngineError</a>;
 struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklEngineInfo" title="struct HklEngineInfo">HklEngineInfo</a>;
@@ -58,13 +65,11 @@ struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklEng
 struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklMode" title="struct HklMode">HklMode</a>;
 struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklModeInfo" title="struct HklModeInfo">HklModeInfo</a>;
 struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklModeOperations" title="struct HklModeOperations">HklModeOperations</a>;
-struct              <a class="link" href="hkl-hkl-pseudoaxis-private.html#HklPseudoAxis" title="struct HklPseudoAxis">HklPseudoAxis</a>;
 HklParameter *      <a class="link" href="hkl-hkl-pseudoaxis-private.html#axis" title="axis">axis</a>;
+<span class="returnvalue">return</span>              <a class="link" href="hkl-darray.html#darray-item" title="darray_item ()">darray_item</a>                         ();
 typedef             <a class="link" href="hkl-hkl-pseudoaxis-private.html#darray-mode" title="darray_mode">darray_mode</a>;
-HklPseudoAxis *     <a class="link" href="hkl-hkl-parameter-private.html#dup" title="dup">dup</a>;
 <span class="returnvalue">return</span>              <a class="link" href="hkl-hkl-geometry-private.html#g-quark-from-static-string" title="g_quark_from_static_string ()">g_quark_from_static_string</a>          ();
 uint                <a class="link" href="hkl-hkl-pseudoaxis-private.html#i" title="i">i</a>;
-HklPseudoAxis *     <a class="link" href="hkl-hkl-pseudoaxis-private.html#pseudo-axis" title="pseudo_axis">pseudo_axis</a>;
 HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#self" title="self">self</a>;
 </pre>
 </div>
@@ -80,6 +85,11 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 </div>
 <hr>
 <div class="refsect2">
+<a name="HKL-ENGINE-INFO:CAPS"></a><h3>HKL_ENGINE_INFO()</h3>
+<pre class="programlisting">#define             HKL_ENGINE_INFO(_name, _pseudo_axes, _dependencies)</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="HKL-ENGINE-LIST-ERROR:CAPS"></a><h3>HKL_ENGINE_LIST_ERROR</h3>
 <pre class="programlisting">#define HKL_ENGINE_LIST_ERROR hkl_engine_list_error_quark ()
 </pre>
@@ -93,7 +103,19 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 <hr>
 <div class="refsect2">
 <a name="HKL-MODE-INFO:CAPS"></a><h3>HKL_MODE_INFO()</h3>
-<pre class="programlisting">#define HKL_MODE_INFO(_name, _axes_r, _axes_w) .name=_name, .axes_r=DARRAY(_axes_r), .axes_w=DARRAY(_axes_w)
+<pre class="programlisting">#define HKL_MODE_INFO(_name, _axes_r, _axes_w) HKL_MODE_INFO_RO((_name), (_axes_r)), .axes_w=DARRAY((_axes_w))
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="HKL-MODE-INFO-RO:CAPS"></a><h3>HKL_MODE_INFO_RO()</h3>
+<pre class="programlisting">#define HKL_MODE_INFO_RO(_name, _axes) .name=_name, .axes_r=DARRAY(_axes)
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="HKL-MODE-INFO-RO-WITH-PARAMS:CAPS"></a><h3>HKL_MODE_INFO_RO_WITH_PARAMS()</h3>
+<pre class="programlisting">#define HKL_MODE_INFO_RO_WITH_PARAMS(_name, _axes, _parameters) HKL_MODE_INFO_RO((_name), (_axes)), .parameters=DARRAY(_parameters)
 </pre>
 </div>
 <hr>
@@ -108,11 +130,6 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 </div>
 <hr>
 <div class="refsect2">
-<a name="HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS"></a><h3>HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS</h3>
-<pre class="programlisting">#define             HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="HklEngine"></a><h3>HklEngine</h3>
 <pre class="programlisting">typedef struct {
 	const HklEngineInfo *info;
@@ -151,7 +168,8 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 <a name="HklEngineInfo"></a><h3>struct HklEngineInfo</h3>
 <pre class="programlisting">struct HklEngineInfo {
 	const char *name;
-	const darray(const HklPseudoAxis *) pseudo_axes;
+	const darray(const HklParameter *) pseudo_axes;
+	unsigned int dependencies;
 };
 </pre>
 </div>
@@ -164,6 +182,7 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 	HklGeometry *geometry;
 	HklDetector *detector;
 	HklSample *sample;
+	darray_parameter pseudo_axes;
 } HklEngineList;
 </pre>
 </div>
@@ -239,29 +258,19 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 </div>
 <hr>
 <div class="refsect2">
-<a name="HklPseudoAxis"></a><h3>struct HklPseudoAxis</h3>
-<pre class="programlisting">struct HklPseudoAxis {
-	HklParameter parameter;
-	HklEngine *engine;
-};
-</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="axis"></a><h3>axis</h3>
 <pre class="programlisting">			HklParameter *axis = hkl_geometry_get_axis_by_name(self->geometry,
 </pre>
 </div>
 <hr>
 <div class="refsect2">
-<a name="darray-mode"></a><h3>darray_mode</h3>
-<pre class="programlisting">typedef darray(HklMode *) darray_mode;
-</pre>
+<a name="darray-item"></a><h3>darray_item ()</h3>
+<pre class="programlisting"><span class="returnvalue">return</span>              darray_item                         ();</pre>
 </div>
 <hr>
 <div class="refsect2">
-<a name="dup"></a><h3>dup</h3>
-<pre class="programlisting">	HklPseudoAxis *dup = HKL_MALLOC(HklPseudoAxis);
+<a name="darray-mode"></a><h3>darray_mode</h3>
+<pre class="programlisting">typedef darray(HklMode *) darray_mode;
 </pre>
 </div>
 <hr>
@@ -277,12 +286,6 @@ HklMode *           <a class="link" href="hkl-hkl-pseudoaxis-auto-private.html#s
 </div>
 <hr>
 <div class="refsect2">
-<a name="pseudo-axis"></a><h3>pseudo_axis</h3>
-<pre class="programlisting">	HklPseudoAxis *pseudo_axis = container_of(self, HklPseudoAxis, parameter);
-</pre>
-</div>
-<hr>
-<div class="refsect2">
 <a name="self"></a><h3>self</h3>
 <pre class="programlisting">	HklMode *self = NULL;
 </pre>
diff --git a/Documentation/api/html/hkl-hkl-type-builtins.html b/Documentation/api/html/hkl-hkl-type-builtins.html
index 0f644a1..65acf9d 100644
--- a/Documentation/api/html/hkl-hkl-type-builtins.html
+++ b/Documentation/api/html/hkl-hkl-type-builtins.html
@@ -40,6 +40,7 @@
 <pre class="synopsis">#define             <a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-DETECTOR-TYPE:CAPS" title="HKL_TYPE_DETECTOR_TYPE">HKL_TYPE_DETECTOR_TYPE</a>
 #define             <a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-AXIS-NAMES-GET:CAPS" title="HKL_TYPE_ENGINE_AXIS_NAMES_GET">HKL_TYPE_ENGINE_AXIS_NAMES_GET</a>
 #define             <a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-CAPABILITIES:CAPS" title="HKL_TYPE_ENGINE_CAPABILITIES">HKL_TYPE_ENGINE_CAPABILITIES</a>
+#define             <a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-DEPENDENCIES:CAPS" title="HKL_TYPE_ENGINE_DEPENDENCIES">HKL_TYPE_ENGINE_DEPENDENCIES</a>
 #define             <a class="link" href="hkl-hkl-type-builtins.html#HKL-TYPE-UNIT-ENUM:CAPS" title="HKL_TYPE_UNIT_ENUM">HKL_TYPE_UNIT_ENUM</a>
 </pre>
 </div>
@@ -67,6 +68,12 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="HKL-TYPE-ENGINE-DEPENDENCIES:CAPS"></a><h3>HKL_TYPE_ENGINE_DEPENDENCIES</h3>
+<pre class="programlisting">#define HKL_TYPE_ENGINE_DEPENDENCIES (hkl_engine_dependencies_get_type ())
+</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="HKL-TYPE-UNIT-ENUM:CAPS"></a><h3>HKL_TYPE_UNIT_ENUM</h3>
 <pre class="programlisting">#define HKL_TYPE_UNIT_ENUM (hkl_unit_enum_get_type ())
 </pre>
diff --git a/Documentation/api/html/hkl-hkl.html b/Documentation/api/html/hkl-hkl.html
index 3d1a9ce..0314ef1 100644
--- a/Documentation/api/html/hkl-hkl.html
+++ b/Documentation/api/html/hkl-hkl.html
@@ -56,6 +56,7 @@ enum                <a class="link" href="hkl-hkl.html#HklDetectorType" title="e
                     <a class="link" href="hkl-hkl.html#HklEngine" title="HklEngine">HklEngine</a>;
 enum                <a class="link" href="hkl-hkl.html#HklEngineAxisNamesGet" title="enum HklEngineAxisNamesGet">HklEngineAxisNamesGet</a>;
 enum                <a class="link" href="hkl-hkl.html#HklEngineCapabilities" title="enum HklEngineCapabilities">HklEngineCapabilities</a>;
+enum                <a class="link" href="hkl-hkl.html#HklEngineDependencies" title="enum HklEngineDependencies">HklEngineDependencies</a>;
                     <a class="link" href="hkl-hkl.html#HklEngineList" title="HklEngineList">HklEngineList</a>;
                     <a class="link" href="hkl-hkl.html#HklFactory" title="HklFactory">HklFactory</a>;
                     <a class="link" href="hkl-hkl.html#HklGeometry" title="HklGeometry">HklGeometry</a>;
@@ -204,6 +205,16 @@ typedef             <a class="link" href="hkl-hkl.html#darray-string" title="dar
 </div>
 <hr>
 <div class="refsect2">
+<a name="HklEngineDependencies"></a><h3>enum HklEngineDependencies</h3>
+<pre class="programlisting">typedef enum {
+	HKL_ENGINE_DEPENDENCIES_AXES = 1u << 0,
+	HKL_ENGINE_DEPENDENCIES_ENERGY = 1u << 1,
+	HKL_ENGINE_DEPENDENCIES_SAMPLE = 1u << 2,
+} HklEngineDependencies;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="HklEngineList"></a><h3>HklEngineList</h3>
 <pre class="programlisting">typedef struct {
 	_darray(HklEngine *);
@@ -211,6 +222,7 @@ typedef             <a class="link" href="hkl-hkl.html#darray-string" title="dar
 	HklGeometry *geometry;
 	HklDetector *detector;
 	HklSample *sample;
+	darray_parameter pseudo_axes;
 } HklEngineList;
 </pre>
 </div>
@@ -266,6 +278,7 @@ typedef             <a class="link" href="hkl-hkl.html#darray-string" title="dar
 	HklParameter *alpha;
 	HklParameter *beta;
 	HklParameter *gamma;
+	HklParameter *volume;
 } HklLattice;
 </pre>
 </div>
diff --git a/Documentation/api/html/hkl-list.html b/Documentation/api/html/hkl-list.html
index 705d8a1..6975d19 100644
--- a/Documentation/api/html/hkl-list.html
+++ b/Documentation/api/html/hkl-list.html
@@ -49,9 +49,9 @@
                                                          n)
 #define             <a class="link" href="hkl-list.html#list-append-list" title="list_append_list()">list_append_list</a>                    (t,
                                                          f)
-struct <span class="returnvalue">list_head</span> *  <a class="link" href="hkl-list.html#list-check" title="list_check ()">list_check</a>                          (<em class="parameter"><code>const <span class="type">struct list_head</span> *h</code></em>,
+struct <a href="/usr/share/gtk-doc/html/hkl/hkl-list.html#list-head"><span class="returnvalue">list_head</span></a> *  <a class="link" href="hkl-list.html#list-check" title="list_check ()">list_check</a>                          (<em class="parameter"><code>const <span class="type">struct list_head</span> *h</code></em>,
                                                          <em class="parameter"><code>const <span class="type">char</span> *abortstr</code></em>);
-struct <span class="returnvalue">list_node</span> *  <a class="link" href="hkl-list.html#list-check-node" title="list_check_node ()">list_check_node</a>                     (<em class="parameter"><code>const <span class="type">struct list_node</span> *n</code></em>,
+struct <a href="/usr/share/gtk-doc/html/hkl/hkl-list.html#list-node"><span class="returnvalue">list_node</span></a> *  <a class="link" href="hkl-list.html#list-check-node" title="list_check_node ()">list_check_node</a>                     (<em class="parameter"><code>const <span class="type">struct list_node</span> *n</code></em>,
                                                          <em class="parameter"><code>const <span class="type">char</span> *abortstr</code></em>);
 #define             <a class="link" href="hkl-list.html#list-debug" title="list_debug()">list_debug</a>                          (h,
                                                          loc)
@@ -164,13 +164,13 @@ struct <span class="returnvalue">list_node</span> *  <a class="link" href="hkl-l
 <hr>
 <div class="refsect2">
 <a name="list-check"></a><h3>list_check ()</h3>
-<pre class="programlisting">struct <span class="returnvalue">list_head</span> *  list_check                          (<em class="parameter"><code>const <span class="type">struct list_head</span> *h</code></em>,
+<pre class="programlisting">struct <a href="/usr/share/gtk-doc/html/hkl/hkl-list.html#list-head"><span class="returnvalue">list_head</span></a> *  list_check                          (<em class="parameter"><code>const <span class="type">struct list_head</span> *h</code></em>,
                                                          <em class="parameter"><code>const <span class="type">char</span> *abortstr</code></em>);</pre>
 </div>
 <hr>
 <div class="refsect2">
 <a name="list-check-node"></a><h3>list_check_node ()</h3>
-<pre class="programlisting">struct <span class="returnvalue">list_node</span> *  list_check_node                     (<em class="parameter"><code>const <span class="type">struct list_node</span> *n</code></em>,
+<pre class="programlisting">struct <a href="/usr/share/gtk-doc/html/hkl/hkl-list.html#list-node"><span class="returnvalue">list_node</span></a> *  list_check_node                     (<em class="parameter"><code>const <span class="type">struct list_node</span> *n</code></em>,
                                                          <em class="parameter"><code>const <span class="type">char</span> *abortstr</code></em>);</pre>
 </div>
 <hr>
diff --git a/Documentation/api/html/hkl.devhelp2 b/Documentation/api/html/hkl.devhelp2
index 5397101..05c460d 100644
--- a/Documentation/api/html/hkl.devhelp2
+++ b/Documentation/api/html/hkl.devhelp2
@@ -94,7 +94,7 @@
     <keyword type="macro" name="darray_growalloc()" link="hkl-darray.html#darray-growalloc"/>
     <keyword type="macro" name="darray_init()" link="hkl-darray.html#darray-init"/>
     <keyword type="typedef" name="darray_int" link="hkl-darray.html#darray-int"/>
-    <keyword type="macro" name="darray_item()" link="hkl-darray.html#darray-item"/>
+    <keyword type="function" name="darray_item ()" link="hkl-darray.html#darray-item"/>
     <keyword type="typedef" name="darray_long" link="hkl-darray.html#darray-long"/>
     <keyword type="macro" name="darray_make_room()" link="hkl-darray.html#darray-make-room"/>
     <keyword type="macro" name="darray_new" link="hkl-darray.html#darray-new"/>
@@ -135,6 +135,7 @@
     <keyword type="struct" name="HklEngine" link="hkl-hkl.html#HklEngine"/>
     <keyword type="enum" name="enum HklEngineAxisNamesGet" link="hkl-hkl.html#HklEngineAxisNamesGet"/>
     <keyword type="enum" name="enum HklEngineCapabilities" link="hkl-hkl.html#HklEngineCapabilities"/>
+    <keyword type="enum" name="enum HklEngineDependencies" link="hkl-hkl.html#HklEngineDependencies"/>
     <keyword type="struct" name="HklEngineList" link="hkl-hkl.html#HklEngineList"/>
     <keyword type="struct" name="HklFactory" link="hkl-hkl.html#HklFactory"/>
     <keyword type="struct" name="HklGeometry" link="hkl-hkl.html#HklGeometry"/>
@@ -277,7 +278,6 @@
     <keyword type="function" name="hkl_mode_auto_set_real ()" link="hkl-hkl-pseudoaxis-auto-private.html#hkl-mode-auto-set-real"/>
     <keyword type="function" name="hkl_mode_auto_with_init_new ()" link="hkl-hkl-pseudoaxis-auto-private.html#hkl-mode-auto-with-init-new"/>
     <keyword type="variable" name="self" link="hkl-hkl-pseudoaxis-auto-private.html#self"/>
-    <keyword type="struct" name="struct HklEngineEulerians" link="hkl-hkl-pseudoaxis-common-eulerians-private.html#HklEngineEulerians"/>
     <keyword type="function" name="hkl_engine_eulerians_new ()" link="hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new"/>
     <keyword type="function" name="kappa_2_kappap ()" link="hkl-hkl-pseudoaxis-common-eulerians-private.html#kappa-2-kappap"/>
     <keyword type="macro" name="CONSTANT_PARAMETER()" link="hkl-hkl-pseudoaxis-common-hkl-private.html#CONSTANT-PARAMETER:CAPS"/>
@@ -293,20 +293,19 @@
     <keyword type="struct" name="struct HklModePsi" link="hkl-hkl-pseudoaxis-common-psi-private.html#HklModePsi"/>
     <keyword type="function" name="hkl_engine_psi_new ()" link="hkl-hkl-pseudoaxis-common-psi-private.html#hkl-engine-psi-new"/>
     <keyword type="function" name="hkl_mode_psi_new ()" link="hkl-hkl-pseudoaxis-common-psi-private.html#hkl-mode-psi-new"/>
-    <keyword type="struct" name="HklEngineQ" link="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ"/>
-    <keyword type="struct" name="HklEngineQ2" link="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ2"/>
-    <keyword type="struct" name="HklEngineQperQpar" link="hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQperQpar"/>
     <keyword type="function" name="hkl_engine_q2_new ()" link="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q2-new"/>
     <keyword type="function" name="hkl_engine_q_new ()" link="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q-new"/>
     <keyword type="function" name="hkl_engine_qper_qpar_new ()" link="hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-qper-qpar-new"/>
     <keyword type="function" name="qmax ()" link="hkl-hkl-pseudoaxis-common-q-private.html#qmax"/>
     <keyword type="macro" name="HKL_ENGINE_ERROR" link="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-ERROR:CAPS"/>
+    <keyword type="macro" name="HKL_ENGINE_INFO()" link="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-INFO:CAPS"/>
     <keyword type="macro" name="HKL_ENGINE_LIST_ERROR" link="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-LIST-ERROR:CAPS"/>
     <keyword type="macro" name="HKL_ENGINE_OPERATIONS_DEFAULTS" link="hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-OPERATIONS-DEFAULTS:CAPS"/>
     <keyword type="macro" name="HKL_MODE_INFO()" link="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO:CAPS"/>
+    <keyword type="macro" name="HKL_MODE_INFO_RO()" link="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO:CAPS"/>
+    <keyword type="macro" name="HKL_MODE_INFO_RO_WITH_PARAMS()" link="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO-WITH-PARAMS:CAPS"/>
     <keyword type="macro" name="HKL_MODE_INFO_WITH_PARAMS()" link="hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-WITH-PARAMS:CAPS"/>
     <keyword type="macro" name="HKL_MODE_OPERATIONS_DEFAULTS" link="hkl-hkl-pseudoaxis-private.html#HKL-MODE-OPERATIONS-DEFAULTS:CAPS"/>
-    <keyword type="macro" name="HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS" link="hkl-hkl-pseudoaxis-private.html#HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS"/>
     <keyword type="struct" name="HklEngine" link="hkl-hkl-pseudoaxis-private.html#HklEngine"/>
     <keyword type="enum" name="enum HklEngineError" link="hkl-hkl-pseudoaxis-private.html#HklEngineError"/>
     <keyword type="struct" name="struct HklEngineInfo" link="hkl-hkl-pseudoaxis-private.html#HklEngineInfo"/>
@@ -316,13 +315,11 @@
     <keyword type="struct" name="struct HklMode" link="hkl-hkl-pseudoaxis-private.html#HklMode"/>
     <keyword type="struct" name="struct HklModeInfo" link="hkl-hkl-pseudoaxis-private.html#HklModeInfo"/>
     <keyword type="struct" name="struct HklModeOperations" link="hkl-hkl-pseudoaxis-private.html#HklModeOperations"/>
-    <keyword type="struct" name="struct HklPseudoAxis" link="hkl-hkl-pseudoaxis-private.html#HklPseudoAxis"/>
     <keyword type="variable" name="axis" link="hkl-hkl-pseudoaxis-private.html#axis"/>
+    <keyword type="function" name="darray_item ()" link="hkl-hkl-pseudoaxis-private.html#darray-item"/>
     <keyword type="typedef" name="darray_mode" link="hkl-hkl-pseudoaxis-private.html#darray-mode"/>
-    <keyword type="variable" name="dup" link="hkl-hkl-pseudoaxis-private.html#dup"/>
     <keyword type="function" name="g_quark_from_static_string ()" link="hkl-hkl-pseudoaxis-private.html#g-quark-from-static-string"/>
     <keyword type="variable" name="i" link="hkl-hkl-pseudoaxis-private.html#i"/>
-    <keyword type="variable" name="pseudo_axis" link="hkl-hkl-pseudoaxis-private.html#pseudo-axis"/>
     <keyword type="variable" name="self" link="hkl-hkl-pseudoaxis-private.html#self"/>
     <keyword type="function" name="hkl_quaternion_cmp ()" link="hkl-hkl-quaternion-private.html#hkl-quaternion-cmp"/>
     <keyword type="function" name="hkl_quaternion_conjugate ()" link="hkl-hkl-quaternion-private.html#hkl-quaternion-conjugate"/>
@@ -359,6 +356,7 @@
     <keyword type="macro" name="HKL_TYPE_DETECTOR_TYPE" link="hkl-hkl-type-builtins.html#HKL-TYPE-DETECTOR-TYPE:CAPS"/>
     <keyword type="macro" name="HKL_TYPE_ENGINE_AXIS_NAMES_GET" link="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-AXIS-NAMES-GET:CAPS"/>
     <keyword type="macro" name="HKL_TYPE_ENGINE_CAPABILITIES" link="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-CAPABILITIES:CAPS"/>
+    <keyword type="macro" name="HKL_TYPE_ENGINE_DEPENDENCIES" link="hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-DEPENDENCIES:CAPS"/>
     <keyword type="macro" name="HKL_TYPE_UNIT_ENUM" link="hkl-hkl-type-builtins.html#HKL-TYPE-UNIT-ENUM:CAPS"/>
     <keyword type="macro" name="TYPE_HKL_DETECTOR" link="hkl-hkl-types.html#TYPE-HKL-DETECTOR:CAPS"/>
     <keyword type="macro" name="TYPE_HKL_ENGINE" link="hkl-hkl-types.html#TYPE-HKL-ENGINE:CAPS"/>
diff --git a/Documentation/api/html/index.sgml b/Documentation/api/html/index.sgml
index 0962d3e..f4f4aa6 100644
--- a/Documentation/api/html/index.sgml
+++ b/Documentation/api/html/index.sgml
@@ -121,6 +121,7 @@
 <ANCHOR id="HklEngine" href="hkl/hkl-hkl.html#HklEngine">
 <ANCHOR id="HklEngineAxisNamesGet" href="hkl/hkl-hkl.html#HklEngineAxisNamesGet">
 <ANCHOR id="HklEngineCapabilities" href="hkl/hkl-hkl.html#HklEngineCapabilities">
+<ANCHOR id="HklEngineDependencies" href="hkl/hkl-hkl.html#HklEngineDependencies">
 <ANCHOR id="HklEngineList" href="hkl/hkl-hkl.html#HklEngineList">
 <ANCHOR id="HklFactory" href="hkl/hkl-hkl.html#HklFactory">
 <ANCHOR id="HklGeometry" href="hkl/hkl-hkl.html#HklGeometry">
@@ -307,7 +308,6 @@
 <ANCHOR id="hkl-hkl-pseudoaxis-common-eulerians-private.synopsis" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-hkl-pseudoaxis-common-eulerians-private.synopsis">
 <ANCHOR id="hkl-hkl-pseudoaxis-common-eulerians-private.description" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-hkl-pseudoaxis-common-eulerians-private.description">
 <ANCHOR id="hkl-hkl-pseudoaxis-common-eulerians-private.details" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-hkl-pseudoaxis-common-eulerians-private.details">
-<ANCHOR id="HklEngineEulerians" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#HklEngineEulerians">
 <ANCHOR id="hkl-engine-eulerians-new" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#hkl-engine-eulerians-new">
 <ANCHOR id="kappa-2-kappap" href="hkl/hkl-hkl-pseudoaxis-common-eulerians-private.html#kappa-2-kappap">
 <ANCHOR id="hkl-hkl-pseudoaxis-common-hkl-private" href="hkl/hkl-hkl-pseudoaxis-common-hkl-private.html">
@@ -335,9 +335,6 @@
 <ANCHOR id="hkl-hkl-pseudoaxis-common-q-private.synopsis" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-hkl-pseudoaxis-common-q-private.synopsis">
 <ANCHOR id="hkl-hkl-pseudoaxis-common-q-private.description" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-hkl-pseudoaxis-common-q-private.description">
 <ANCHOR id="hkl-hkl-pseudoaxis-common-q-private.details" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-hkl-pseudoaxis-common-q-private.details">
-<ANCHOR id="HklEngineQ" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ">
-<ANCHOR id="HklEngineQ2" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQ2">
-<ANCHOR id="HklEngineQperQpar" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#HklEngineQperQpar">
 <ANCHOR id="hkl-engine-q2-new" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q2-new">
 <ANCHOR id="hkl-engine-q-new" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-q-new">
 <ANCHOR id="hkl-engine-qper-qpar-new" href="hkl/hkl-hkl-pseudoaxis-common-q-private.html#hkl-engine-qper-qpar-new">
@@ -347,12 +344,14 @@
 <ANCHOR id="hkl-hkl-pseudoaxis-private.description" href="hkl/hkl-hkl-pseudoaxis-private.html#hkl-hkl-pseudoaxis-private.description">
 <ANCHOR id="hkl-hkl-pseudoaxis-private.details" href="hkl/hkl-hkl-pseudoaxis-private.html#hkl-hkl-pseudoaxis-private.details">
 <ANCHOR id="HKL-ENGINE-ERROR:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-ERROR:CAPS">
+<ANCHOR id="HKL-ENGINE-INFO:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-INFO:CAPS">
 <ANCHOR id="HKL-ENGINE-LIST-ERROR:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-LIST-ERROR:CAPS">
 <ANCHOR id="HKL-ENGINE-OPERATIONS-DEFAULTS:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-ENGINE-OPERATIONS-DEFAULTS:CAPS">
 <ANCHOR id="HKL-MODE-INFO:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO:CAPS">
+<ANCHOR id="HKL-MODE-INFO-RO:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO:CAPS">
+<ANCHOR id="HKL-MODE-INFO-RO-WITH-PARAMS:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-RO-WITH-PARAMS:CAPS">
 <ANCHOR id="HKL-MODE-INFO-WITH-PARAMS:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-MODE-INFO-WITH-PARAMS:CAPS">
 <ANCHOR id="HKL-MODE-OPERATIONS-DEFAULTS:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-MODE-OPERATIONS-DEFAULTS:CAPS">
-<ANCHOR id="HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS" href="hkl/hkl-hkl-pseudoaxis-private.html#HKL-PARAMETER-OPERATIONS-PSEUDOAXIS-DEFAULTS:CAPS">
 <ANCHOR id="HklEngine" href="hkl/hkl-hkl-pseudoaxis-private.html#HklEngine">
 <ANCHOR id="HklEngineError" href="hkl/hkl-hkl-pseudoaxis-private.html#HklEngineError">
 <ANCHOR id="HklEngineInfo" href="hkl/hkl-hkl-pseudoaxis-private.html#HklEngineInfo">
@@ -362,13 +361,11 @@
 <ANCHOR id="HklMode" href="hkl/hkl-hkl-pseudoaxis-private.html#HklMode">
 <ANCHOR id="HklModeInfo" href="hkl/hkl-hkl-pseudoaxis-private.html#HklModeInfo">
 <ANCHOR id="HklModeOperations" href="hkl/hkl-hkl-pseudoaxis-private.html#HklModeOperations">
-<ANCHOR id="HklPseudoAxis" href="hkl/hkl-hkl-pseudoaxis-private.html#HklPseudoAxis">
 <ANCHOR id="axis" href="hkl/hkl-hkl-pseudoaxis-private.html#axis">
+<ANCHOR id="darray-item" href="hkl/hkl-hkl-pseudoaxis-private.html#darray-item">
 <ANCHOR id="darray-mode" href="hkl/hkl-hkl-pseudoaxis-private.html#darray-mode">
-<ANCHOR id="dup" href="hkl/hkl-hkl-pseudoaxis-private.html#dup">
 <ANCHOR id="g-quark-from-static-string" href="hkl/hkl-hkl-pseudoaxis-private.html#g-quark-from-static-string">
 <ANCHOR id="i" href="hkl/hkl-hkl-pseudoaxis-private.html#i">
-<ANCHOR id="pseudo-axis" href="hkl/hkl-hkl-pseudoaxis-private.html#pseudo-axis">
 <ANCHOR id="self" href="hkl/hkl-hkl-pseudoaxis-private.html#self">
 <ANCHOR id="hkl-hkl-quaternion-private" href="hkl/hkl-hkl-quaternion-private.html">
 <ANCHOR id="hkl-hkl-quaternion-private.synopsis" href="hkl/hkl-hkl-quaternion-private.html#hkl-hkl-quaternion-private.synopsis">
@@ -421,6 +418,7 @@
 <ANCHOR id="HKL-TYPE-DETECTOR-TYPE:CAPS" href="hkl/hkl-hkl-type-builtins.html#HKL-TYPE-DETECTOR-TYPE:CAPS">
 <ANCHOR id="HKL-TYPE-ENGINE-AXIS-NAMES-GET:CAPS" href="hkl/hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-AXIS-NAMES-GET:CAPS">
 <ANCHOR id="HKL-TYPE-ENGINE-CAPABILITIES:CAPS" href="hkl/hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-CAPABILITIES:CAPS">
+<ANCHOR id="HKL-TYPE-ENGINE-DEPENDENCIES:CAPS" href="hkl/hkl-hkl-type-builtins.html#HKL-TYPE-ENGINE-DEPENDENCIES:CAPS">
 <ANCHOR id="HKL-TYPE-UNIT-ENUM:CAPS" href="hkl/hkl-hkl-type-builtins.html#HKL-TYPE-UNIT-ENUM:CAPS">
 <ANCHOR id="hkl-hkl-types" href="hkl/hkl-hkl-types.html">
 <ANCHOR id="hkl-hkl-types.synopsis" href="hkl/hkl-hkl-types.html#hkl-hkl-types.synopsis">
diff --git a/Documentation/hkl.html b/Documentation/hkl.html
index 6c88a67..642d73c 100644
--- a/Documentation/hkl.html
+++ b/Documentation/hkl.html
@@ -2,8 +2,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Welcome to hkl's 4.99.99.1914 documentation!</title>
-<!-- 2015-03-09 lun. 09:27 -->
+<title>Welcome to hkl's 4.99.99.1940 documentation!</title>
+<!-- 2015-05-04 lun. 10:39 -->
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
 <meta name="generator" content="Org-mode"/>
 <meta name="author" content="Picca Frédéric-Emmanuel"/>
@@ -175,7 +175,7 @@ for the JavaScript code in this tag.
 </head>
 <body>
 <div id="content">
-<h1 class="title">Welcome to hkl's 4.99.99.1914 documentation!</h1>
+<h1 class="title">Welcome to hkl's 4.99.99.1940 documentation!</h1>
 <div id="table-of-contents">
 <h2>Table of Contents</h2>
 <div id="text-table-of-contents">
@@ -304,7 +304,7 @@ for the JavaScript code in this tag.
 <li><a href="#sec-4-3">4.3. Hacking hkl</a>
 <ul>
 <li><a href="#sec-4-3-1">4.3.1. Bug reporting</a></li>
-<li><a href="#sec-4-3-2">4.3.2. Providing patchs</a></li>
+<li><a href="#sec-4-3-2">4.3.2. Providing patches</a></li>
 </ul>
 </li>
 <li><a href="#sec-4-4">4.4. Howto's</a>
@@ -320,42 +320,57 @@ for the JavaScript code in this tag.
 <li><a href="#sec-5-1">5.1. Python</a></li>
 </ul>
 </li>
-<li><a href="#sec-6">6. Todo</a>
+<li><a href="#sec-6">6. Releases</a>
 <ul>
-<li><a href="#sec-6-1">6.1. hkl</a>
+<li><a href="#sec-6-1">6.1. 4.99.99.1940</a>
 <ul>
-<li><a href="#sec-6-1-1">6.1.1. <code>[0/2]</code> PetraIII</a></li>
-<li><a href="#sec-6-1-2">6.1.2. <code>[2/4]</code> HklParameter</a></li>
-<li><a href="#sec-6-1-3">6.1.3. HklGeometryList different method to help select a solution.</a></li>
-<li><a href="#sec-6-1-4">6.1.4. add a fit on the Hklaxis offsets.</a></li>
-<li><a href="#sec-6-1-5">6.1.5. API to put a detector and a sample on the Geometry.</a></li>
-<li><a href="#sec-6-1-6">6.1.6. HklSample</a></li>
-<li><a href="#sec-6-1-7">6.1.7. HklEngine "zone"</a></li>
-<li><a href="#sec-6-1-8">6.1.8. HklEngine "custom"</a></li>
-<li><a href="#sec-6-1-9">6.1.9. create a macro to help compare two real the right way</a></li>
-<li><a href="#sec-6-1-10">6.1.10. add an hkl_sample_set_lattice_unit()</a></li>
-<li><a href="#sec-6-1-11">6.1.11. SOLEIL SIXS</a></li>
-<li><a href="#sec-6-1-12">6.1.12. generalisation of the z-axis hkl solver</a></li>
-<li><a href="#sec-6-1-13">6.1.13. investigate the prigo geometry.</a></li>
-<li><a href="#sec-6-1-14">6.1.14. augeas/elektra for the plugin configure part.</a></li>
-<li><a href="#sec-6-1-15">6.1.15. logging</a></li>
-<li><a href="#sec-6-1-16">6.1.16. performances</a></li>
-</ul>
-</li>
-<li><a href="#sec-6-2">6.2. documentation</a>
+<li><a href="#sec-6-1-1">6.1.1. <code>HklLattice</code> add an <code>hkl_lattice_volume_get</code></a></li>
+<li><a href="#sec-6-1-2">6.1.2. <code>HklEngine</code></a></li>
+<li><a href="#sec-6-1-3">6.1.3. <code>HklLattice</code> expose in the binding the _x_get/set methods <span class="timestamp-wrapper"><span class="timestamp"><2015-03-24 mar.></span></span></a></li>
+<li><a href="#sec-6-1-4">6.1.4. <code>HklSampleReflection</code> expose the flag_get/set and geometry_get/set method <span class="timestamp-wrapper"><span class="timestamp"><2015-03-24 mar.></span></span></a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#sec-7">7. Todo</a>
 <ul>
-<li><a href="#sec-6-2-1">6.2.1. <code>[1/6]</code> rewrite documentation in org-mode</a></li>
+<li><a href="#sec-7-1">7.1. hkl</a>
+<ul>
+<li><a href="#sec-7-1-1">7.1.1. <code>[0/2]</code> HklEngine "read_only"</a></li>
+<li><a href="#sec-7-1-2">7.1.2. HklSource</a></li>
+<li><a href="#sec-7-1-3">7.1.3. <code>[0/2]</code> PetraIII</a></li>
+<li><a href="#sec-7-1-4">7.1.4. <code>[2/4]</code> HklParameter</a></li>
+<li><a href="#sec-7-1-5">7.1.5. This will help for the documentation and the gui.</a></li>
+<li><a href="#sec-7-1-6">7.1.6. HklGeometryList different method to help select a solution.</a></li>
+<li><a href="#sec-7-1-7">7.1.7. add a fit on the Hklaxis offsets.</a></li>
+<li><a href="#sec-7-1-8">7.1.8. API to put a detector and a sample on the Geometry.</a></li>
+<li><a href="#sec-7-1-9">7.1.9. HklSample</a></li>
+<li><a href="#sec-7-1-10">7.1.10. HklEngine "zone"</a></li>
+<li><a href="#sec-7-1-11">7.1.11. HklEngine "custom"</a></li>
+<li><a href="#sec-7-1-12">7.1.12. create a macro to help compare two real the right way</a></li>
+<li><a href="#sec-7-1-13">7.1.13. add an hkl_sample_set_lattice_unit()</a></li>
+<li><a href="#sec-7-1-14">7.1.14. SOLEIL SIXS</a></li>
+<li><a href="#sec-7-1-15">7.1.15. generalisation of the z-axis hkl solver</a></li>
+<li><a href="#sec-7-1-16">7.1.16. investigate the prigo geometry.</a></li>
+<li><a href="#sec-7-1-17">7.1.17. augeas/elektra for the plugin configure part.</a></li>
+<li><a href="#sec-7-1-18">7.1.18. logging</a></li>
+<li><a href="#sec-7-1-19">7.1.19. performances</a></li>
+</ul>
+</li>
+<li><a href="#sec-7-2">7.2. documentation</a>
+<ul>
+<li><a href="#sec-7-2-1">7.2.1. <code>[1/6]</code> rewrite documentation in org-mode</a></li>
 </ul>
 </li>
-<li><a href="#sec-6-3">6.3. <code>[0/3]</code> gui</a></li>
-<li><a href="#sec-6-4">6.4. hkl3d</a>
+<li><a href="#sec-7-3">7.3. <code>[0/3]</code> gui</a></li>
+<li><a href="#sec-7-4">7.4. hkl3d</a>
 <ul>
-<li><a href="#sec-6-4-1">6.4.1. add a method to find the 3D models in the right directories.</a></li>
+<li><a href="#sec-7-4-1">7.4.1. add a method to find the 3D models in the right directories.</a></li>
 </ul>
 </li>
-<li><a href="#sec-6-5">6.5. packaging</a>
+<li><a href="#sec-7-5">7.5. packaging</a>
 <ul>
-<li><a href="#sec-6-5-1">6.5.1. add a .spec file for rpm generation.</a></li>
+<li><a href="#sec-7-5-1">7.5.1. add a .spec file for rpm generation.</a></li>
 </ul>
 </li>
 </ul>
@@ -368,7 +383,7 @@ for the JavaScript code in this tag.
 <h2 id="sec-1"><span class="section-number-2">1</span> Introduction</h2>
 <div class="outline-text-2" id="text-1">
 <p>
-The purpose of the library is to factorise single crystal
+The purpose of the library is to factorize single crystal
 diffraction angles computation for different kind of diffractometer
 geometries. It is used at the SOLEIL, Desy and Alba synchrotron with
 the Tango control system to pilot diffractometers.
@@ -393,7 +408,7 @@ library.
 </li>
 </ul>
 </li>
-<li>Crystal lattice affinement
+<li>Crystal lattice refinement
 <ul class="org-ul">
 <li>with more than 2 reflections you can select which parameter must
 be fitted.
@@ -447,7 +462,7 @@ R_{uvw}=u\cdot\vec{a}+v\cdot\vec{b}+w\cdot\vec{c}
 
 <p>
 \(\vec{a}\), \(\vec{b}\), \(\vec{c}\) are the former vector of a base of the
-space. <code>u</code>, <code>v</code>, <code>w</code> are integrers. The pattern contain atomes
+space. <code>u</code>, <code>v</code>, <code>w</code> are integers. The pattern contain atoms
 associated to each lattice node. the purpose of diffraction is to study
 the interaction of this crystal (pattern+lattice) with X-rays.
 </p>
@@ -461,7 +476,7 @@ the interaction of this crystal (pattern+lattice) with X-rays.
 <p>
 this lattice is defined by \(\vec{a}\), \(\vec{b}\), \(\vec{c}\) vectors, and
 the angles \(\alpha\), \(\beta\), \(\gamma\). In general cases this lattice is
-not othonormal.
+not orthonormal.
 </p>
 
 <p>
@@ -481,7 +496,7 @@ lattice defined like this:
 </p>
 
 <p>
-It is then possible to define thoses orthogonal properties:
+It is then possible to define theses orthogonal properties:
 </p>
 
 \begin{eqnarray*}
@@ -516,7 +531,7 @@ D=\sqrt{1-\cos^{2}\alpha-\cos^{2}\beta-\cos^{2}\gamma+2\cos\alpha\cos\beta\cos\g
 <p>
 To compute the angles between the reciprocal space vectors, it is once
 again possible to use the previous equations reciprocal to obtain the
-sinus and cosinus of the angles \(\alpha^\star\), \(\beta^\star\) et
+sines and cosines of the angles \(\alpha^\star\), \(\beta^\star\) and
 \(\gamma^\star\):
 </p>
 
@@ -525,13 +540,30 @@ sinus and cosinus of the angles \(\alpha^\star\), \(\beta^\star\) et
 \cos\beta^{\star}=\frac{\cos\gamma\cos\alpha-\cos\beta}{\sin\gamma\sin\alpha} & \, & \sin\beta^{\star}=\frac{D}{\sin\gamma\sin\alpha}\\
 \cos\gamma^{\star}=\frac{\cos\alpha\cos\beta-\cos\gamma}{\sin\alpha\sin\beta} & \, & \sin\gamma^{\star}=\frac{D}{\sin\alpha\sin\beta}
 \end{eqnarray*}
+
+<p>
+the volume of the lattice can be compute this way:
+</p>
+
+\begin{displaymath}
+V = abcD
+\end{displaymath}
+
+<p>
+or
+</p>
+
+\begin{displaymath}
+V = \vec{a} \dot (\vec{b} \wedge \vec{c}) = \vec{b} \dot (\vec{c} \wedge \vec{a}) = \vec{c} \dot (\vec{a} \wedge \vec{b})
+\end{displaymath}
 </div>
 </div>
+
 <div id="outline-container-sec-1-3-2" class="outline-4">
 <h4 id="sec-1-3-2"><span class="section-number-4">1.3.2</span> Diffraction</h4>
 <div class="outline-text-4" id="text-1-3-2">
 <p>
-Let the incomming X-rays beam whose wave vector is \(\vec{k_{i}}\),
+Let the incoming X-rays beam whose wave vector is \(\vec{k_{i}}\),
 \(|k_{i}|=\tau/\lambda\) where \(\lambda\) is the wavelength of the signal.
 The \(\vec{k_{d}}\) vector wavelength of the diffracted beam. There is
 diffusion if the diffusion vector \(\vec{q}\) can be expressed as follows:
@@ -542,7 +574,7 @@ diffusion if the diffusion vector \(\vec{q}\) can be expressed as follows:
 \end{displaymath}
 
 <p>
-where \((h,k,l)\in\mathbb{N}^{3}\) and \((h,k,l)\neq(0,0,0)\). Thoses
+where \((h,k,l)\in\mathbb{N}^{3}\) and \((h,k,l)\neq(0,0,0)\). Theses
 indices \((h,k,l)\) are named Miller indices.
 </p>
 
@@ -560,8 +592,8 @@ where \(d\) is the inter-plan distance and \(n \in \mathbb{N}\).
 </p>
 
 <p>
-The diffusion accure for a unique \(\theta\) angle. Then we got \(\vec{q}\)
-perpendicular to the diffraction plan.
+The diffusion occurs for an unique \(\theta\) angle. Then we got
+\(\vec{q}\) perpendicular to the diffraction plan.
 </p>
 
 <p>
@@ -575,8 +607,8 @@ reciprocal space.
 <div class="outline-text-4" id="text-1-3-3">
 </div><ol class="org-ol"><li>Properties<br/><div class="outline-text-5" id="text-1-3-3-1">
 <p>
-The quaternions will be used to discribe the diffractometers geometries.
-Thoses quaternions can represent 3D rotations. There is different way to
+The quaternions will be used to describe the diffractometers geometries.
+Theses quaternions can represent 3D rotations. There is different way to
 describe then like complex numbers.
 </p>
 
@@ -612,7 +644,7 @@ q^{*}=[a,-\vec{u}]=a-bi-cj-dk
 </li>
 <li>Operations<br/><div class="outline-text-5" id="text-1-3-3-2">
 <p>
-The difference with the complexnumber algebre is about
+The difference with the complex number algebra is about
 non-commutativity.
 </p>
 
@@ -1215,6 +1247,43 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 </ul>
 </div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-1-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>omega</b>", "<b>chi</b>", "<b>phi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
 </li></ol>
 </div>
 </div>
@@ -1399,6 +1468,43 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 </ul>
 </div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-2-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>omega</b>", "<b>chi</b>", "<b>phi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
 </li></ol>
 </div>
 </div>
@@ -1703,11 +1809,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-3-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-3-2-6">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>mu</b>", "<b>omega</b>", "<b>chi</b>", "<b>phi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -1947,6 +2119,43 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 </ul>
 </div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-4-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>komega</b>", "<b>kappa</b>", "<b>kphi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
 </li></ol>
 </div>
 </div>
@@ -2315,13 +2524,79 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-5-2-6">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>mu</b>", "<b>komega</b>", "<b>kappa</b>", "<b>kphi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-5-2-7">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+</ul>
 </li>
 </ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
 </li>
 </ul>
 </li>
@@ -2631,6 +2906,43 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 </ul>
 </div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-7-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>omega</b>", "<b>chi</b>", "<b>phi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
 </li></ol>
 </div>
 </div>
@@ -2999,11 +3311,11 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3011,12 +3323,78 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 </ul>
 </div>
-</li></ol>
-</div>
-</div>
+</li>
 
-<div id="outline-container-sec-3-9" class="outline-3">
-<h3 id="sec-3-9"><span class="section-number-3">3.9</span> SOLEIL SIRIUS TURRET</h3>
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-8-2-6">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-8-2-7">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>mu</b>", "<b>komega</b>", "<b>kappa</b>", "<b>kphi</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li></ol>
+</div>
+</div>
+
+<div id="outline-container-sec-3-9" class="outline-3">
+<h3 id="sec-3-9"><span class="section-number-3">3.9</span> SOLEIL SIRIUS TURRET</h3>
 <div class="outline-text-3" id="text-3-9">
 </div><div id="outline-container-sec-3-9-1" class="outline-4">
 <h4 id="sec-3-9-1"><span class="section-number-4">3.9.1</span> Axes:</h4>
@@ -3123,11 +3501,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-9-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-9-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>thetah</b>", "<b>alphay</b>", "<b>alphax</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3245,11 +3689,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-10-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-10-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>pitch</b>", "<b>mu</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3379,11 +3889,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-11-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-11-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>beta</b>", "<b>mu</b>", "<b>omega</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3505,11 +4081,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-12-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-12-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>beta</b>", "<b>mu</b>", "<b>omega</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3657,11 +4299,77 @@ This section is automatically generating by introspecting the hkl library.
 </li>
 <li>parameters: 
 <ul class="org-ul">
-<li><b>x</b> [0.0]: the first coordinate of the surface vector
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>y</b> [1.0]: the second coordinate of the surface vector
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
 </li>
-<li><b>z</b> [0.0]: the third coordinate of the surface vector
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>tth2</b>":<br/><div class="outline-text-5" id="text-3-14-2-4">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>tth</b>" : the \(2 \theta\) angle
+</li>
+
+<li>"<b>alpha</b>" : angle of the projection of \(\vec{q}\) on the \(yOz\) plan and \(\vec{y}\)
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>tth2</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>axes (write): "<b>gamma</b>", "<b>delta</b>"
+</li>
+<li>parameters: No parameter
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</li>
+
+<li>"<b>incidence</b>":<br/><div class="outline-text-5" id="text-3-14-2-5">
+<ul class="org-ul">
+<li>pseudo axes:
+<ul class="org-ul">
+<li>"<b>incidence</b>" : incidence of the incomming beam.
+</li>
+
+<li>"<b>azimuth</b>" : azimuth of the sample surface (projection of \(\vec{n}\) on the \(yOz\) plan
+</li>
+</ul>
+</li>
+</ul>
+
+
+<ul class="org-ul">
+<li>mode: "<b>incidence</b>"
+<ul class="org-ul">
+<li>axes (read) : "<b>mu</b>", "<b>omega</b>"
+</li>
+<li>axes (write): 
+</li>
+<li>parameters: 
+<ul class="org-ul">
+<li><b>x</b> [0.0]: the x coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>y</b> [1.0]: the y coordinate of the surface \(\vec{n}\)
+</li>
+<li><b>z</b> [0.0]: the z coordinate of the surface \(\vec{n}\)
 </li>
 </ul>
 </li>
@@ -3833,14 +4541,14 @@ You can find the bug tracker here
 <li>Other OS
 
 <p>
-You just need to send an <a href="mailto:submit at bugs.debian.org?subject=%20My%20problem%20with%20hkl...&body=Package:%20hkl%0AVersion:%204.99.99.1914%0A%0AI%20found%20this%20problem%20in%20hkl">email</a>
+You just need to send an <a href="mailto:submit at bugs.debian.org?subject=%20My%20problem%20with%20hkl...&body=Package:%20hkl%0AVersion:%204.99.99.1940%0A%0AI%20found%20this%20problem%20in%20hkl">email</a>
 </p>
 </li>
 </ul>
 </div>
 </div>
 <div id="outline-container-sec-4-3-2" class="outline-4">
-<h4 id="sec-4-3-2"><span class="section-number-4">4.3.2</span> Providing patchs</h4>
+<h4 id="sec-4-3-2"><span class="section-number-4">4.3.2</span> Providing patches</h4>
 <div class="outline-text-4" id="text-4-3-2">
 <p>
 you can send your patch to <i>Picca
@@ -4116,15 +4824,159 @@ use only the closest solution for the next points of the trajectory.
 </div>
 
 <div id="outline-container-sec-6" class="outline-2">
-<h2 id="sec-6"><span class="section-number-2">6</span> Todo</h2>
+<h2 id="sec-6"><span class="section-number-2">6</span> Releases</h2>
 <div class="outline-text-2" id="text-6">
 </div><div id="outline-container-sec-6-1" class="outline-3">
-<h3 id="sec-6-1"><span class="section-number-3">6.1</span> hkl</h3>
+<h3 id="sec-6-1"><span class="section-number-3">6.1</span> 4.99.99.1940</h3>
 <div class="outline-text-3" id="text-6-1">
 </div><div id="outline-container-sec-6-1-1" class="outline-4">
-<h4 id="sec-6-1-1"><span class="section-number-4">6.1.1</span> <span class="todo TODO">TODO</span> <code>[0/2]</code> PetraIII</h4>
+<h4 id="sec-6-1-1"><span class="section-number-4">6.1.1</span> <span class="done DONE">DONE</span> <code>HklLattice</code> add an <code>hkl_lattice_volume_get</code></h4>
 <div class="outline-text-4" id="text-6-1-1">
-</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> computation problem<br/><div class="outline-text-5" id="text-6-1-1-1">
+<div class="org-src-container">
+
+<pre class="src src-c">volume = hkl_lattice_volume_get(lattice);
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-sec-6-1-2" class="outline-4">
+<h4 id="sec-6-1-2"><span class="section-number-4">6.1.2</span> <span class="done DONE">DONE</span> <code>HklEngine</code></h4>
+<div class="outline-text-4" id="text-6-1-2">
+</div><ol class="org-ol"><li>"nrj, sample, &#x2026;  dependencies" <span class="timestamp-wrapper"><span class="timestamp"><2015-03-24 mar.></span></span><br/><div class="outline-text-5" id="text-6-1-2-1">
+<p>
+Add the <code>hkl_engine_dependencies_get</code> method which return if the
+<code>HklEngine</code> depends of the axes, the energy, or the sample. the
+possible values are stored in the <code>HklEngineDependencies</code> enum.
+</p>
+
+<div class="org-src-container">
+
+<pre class="src src-c">dependencies = hkl_engine_dependencies_get(engine);
+if (dependencies & HKL_ENGINE_DEPENDENCIES_ENERGY) {
+	...
+}
+if (dependencies & HKL_ENGINE_DEPENDENCIES_SAMPLE) {
+	...
+}
+...
+</pre>
+</div>
+</div>
+</li>
+
+<li>"tth2" <span class="timestamp-wrapper"><span class="timestamp"><2015-04-03 ven></span></span><br/><div class="outline-text-5" id="text-6-1-2-2">
+<p>
+Add a new hkl engine which contain two pseudo axes.
+</p>
+<ul class="org-ul">
+<li><code>tth</code>  two times the diffraction angle \(\theta\)
+</li>
+<li><code>alpha</code> the azimuth of q in the zOy plan.
+</li>
+</ul>
+</div>
+</li>
+
+<li>"incidence" <span class="timestamp-wrapper"><span class="timestamp"><2015-04-21 mar.></span></span><br/><div class="outline-text-5" id="text-6-1-2-3">
+<p>
+Add a new incidence engine which contain only one pseudo axis.
+</p>
+<ul class="org-ul">
+<li><code>incidence</code> the incoming beam incidence on the sample surface.
+</li>
+<li><code>azimuth</code> the sample surface azimuth.
+</li>
+</ul>
+</div>
+</li>
+
+<li><code>hkl_engine_parameter_set</code> <span class="timestamp-wrapper"><span class="timestamp"><2015-05-04 lun.></span></span><br/><div class="outline-text-5" id="text-6-1-2-4">
+<p>
+Fix a bug and expose the method in the binding.
+</p>
+</div>
+</li>
+
+<li>general<br/><div class="outline-text-5" id="text-6-1-2-5">
+<ul class="org-ul">
+<li>use #define AXIS "axis_name" in all the code to set the axes
+names at only one place. <span class="timestamp-wrapper"><span class="timestamp"><2015-04-23 jeu.></span></span>
+</li>
+</ul>
+</div>
+</li></ol>
+</div>
+
+<div id="outline-container-sec-6-1-3" class="outline-4">
+<h4 id="sec-6-1-3"><span class="section-number-4">6.1.3</span> <span class="done DONE">DONE</span> <code>HklLattice</code> expose in the binding the _x_get/set methods <span class="timestamp-wrapper"><span class="timestamp"><2015-03-24 mar.></span></span></h4>
+<div class="outline-text-4" id="text-6-1-3">
+<p>
+Now you can use hkl_lattice_x_get where x=a, b, c, alpha, beta,
+gamma in the bindings.
+</p>
+<div class="org-src-container">
+
+<pre class="src src-python">a = lattice.a_get()
+lattice.a_set(a)
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-sec-6-1-4" class="outline-4">
+<h4 id="sec-6-1-4"><span class="section-number-4">6.1.4</span> <span class="done DONE">DONE</span> <code>HklSampleReflection</code> expose the flag_get/set and geometry_get/set method <span class="timestamp-wrapper"><span class="timestamp"><2015-03-24 mar.></span></span></h4>
+<div class="outline-text-4" id="text-6-1-4">
+<p>
+It is now possible to change the geometry stored in a reflection
+via the bindings.
+</p>
+<div class="org-src-container">
+
+<pre class="src src-python">flag = reflection.flag_get()
+reflection.flag_set(flag)
+
+geometry = reflection.geometry_get()
+geometry.axes_values_set([omega, chi, phi, ...])
+reflection.geometry_set(geometry)
+</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+
+<div id="outline-container-sec-7" class="outline-2">
+<h2 id="sec-7"><span class="section-number-2">7</span> Todo</h2>
+<div class="outline-text-2" id="text-7">
+</div><div id="outline-container-sec-7-1" class="outline-3">
+<h3 id="sec-7-1"><span class="section-number-3">7.1</span> hkl</h3>
+<div class="outline-text-3" id="text-7-1">
+</div><div id="outline-container-sec-7-1-1" class="outline-4">
+<h4 id="sec-7-1-1"><span class="section-number-4">7.1.1</span> <span class="todo TODO">TODO</span> <code>[0/2]</code> HklEngine "read_only"</h4>
+<div class="outline-text-4" id="text-7-1-1">
+<ul class="org-ul">
+<li><code>[&#xa0;]</code> "beta" emergence angle
+</li>
+</ul>
+</div>
+</div>
+
+<div id="outline-container-sec-7-1-2" class="outline-4">
+<h4 id="sec-7-1-2"><span class="section-number-4">7.1.2</span> <span class="todo TODO">TODO</span> HklSource</h4>
+<div class="outline-text-4" id="text-7-1-2">
+<p>
+Create a parameter for the wavelength. This is just internally for
+the futur trajectory system, so no need to change the signature of
+hkl_geometry_vawelength get/set
+</p>
+</div>
+</div>
+
+<div id="outline-container-sec-7-1-3" class="outline-4">
+<h4 id="sec-7-1-3"><span class="section-number-4">7.1.3</span> <span class="todo TODO">TODO</span> <code>[0/2]</code> PetraIII</h4>
+<div class="outline-text-4" id="text-7-1-3">
+</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> computation problem<br/><div class="outline-text-5" id="text-7-1-3-1">
 <p>
 Dear Teresa,
 </p>
@@ -4277,7 +5129,7 @@ SaveDirectory <i>home/p09user/crystals</i>
 </p>
 </div>
 </li>
-<li><span class="todo TODO">TODO</span> another question<br/><div class="outline-text-5" id="text-6-1-1-2">
+<li><span class="todo TODO">TODO</span> another question<br/><div class="outline-text-5" id="text-7-1-3-2">
 <p>
 J'ai un probleme avec la position que le controlleur calcule avec la
 matrice UB que nous t'avons envoye.
@@ -4301,9 +5153,9 @@ ta librairie ?
 </li></ol>
 </div>
 
-<div id="outline-container-sec-6-1-2" class="outline-4">
-<h4 id="sec-6-1-2"><span class="section-number-4">6.1.2</span> <span class="todo TODO">TODO</span> <code>[2/4]</code> HklParameter</h4>
-<div class="outline-text-4" id="text-6-1-2">
+<div id="outline-container-sec-7-1-4" class="outline-4">
+<h4 id="sec-7-1-4"><span class="section-number-4">7.1.4</span> <span class="todo TODO">TODO</span> <code>[2/4]</code> HklParameter</h4>
+<div class="outline-text-4" id="text-7-1-4">
 <ul class="org-ul">
 <li><code>[X]</code> method to use min/max to check for the validity
 </li>
@@ -4317,15 +5169,17 @@ to the axis. that way it would be possible to check a posteriori
 for this degenerescencence.
 </li>
 <li><code>[&#xa0;]</code> Add a description for each parameters.
-This will help for the documentation and the gui.
 </li>
 </ul>
 </div>
 </div>
 
-<div id="outline-container-sec-6-1-3" class="outline-4">
-<h4 id="sec-6-1-3"><span class="section-number-4">6.1.3</span> <span class="todo TODO">TODO</span> HklGeometryList different method to help select a solution.</h4>
-<div class="outline-text-4" id="text-6-1-3">
+<div id="outline-container-sec-7-1-5" class="outline-4">
+<h4 id="sec-7-1-5"><span class="section-number-4">7.1.5</span> <span class="todo TODO">TODO</span> This will help for the documentation and the gui.</h4>
+</div>
+<div id="outline-container-sec-7-1-6" class="outline-4">
+<h4 id="sec-7-1-6"><span class="section-number-4">7.1.6</span> <span class="todo TODO">TODO</span> HklGeometryList different method to help select a solution.</h4>
+<div class="outline-text-4" id="text-7-1-6">
 <p>
 this select solution can depend on the geometry
 for example the kappa axis must be in one side of the plane.
@@ -4333,17 +5187,16 @@ for example the kappa axis must be in one side of the plane.
 </div>
 </div>
 
-<div id="outline-container-sec-6-1-4" class="outline-4">
-<h4 id="sec-6-1-4"><span class="section-number-4">6.1.4</span> <span class="todo TODO">TODO</span> add a fit on the Hklaxis offsets.</h4>
+<div id="outline-container-sec-7-1-7" class="outline-4">
+<h4 id="sec-7-1-7"><span class="section-number-4">7.1.7</span> <span class="todo TODO">TODO</span> add a fit on the Hklaxis offsets.</h4>
 </div>
-<div id="outline-container-sec-6-1-5" class="outline-4">
-<h4 id="sec-6-1-5"><span class="section-number-4">6.1.5</span> <span class="todo TODO">TODO</span> API to put a detector and a sample on the Geometry.</h4>
+<div id="outline-container-sec-7-1-8" class="outline-4">
+<h4 id="sec-7-1-8"><span class="section-number-4">7.1.8</span> <span class="todo TODO">TODO</span> API to put a detector and a sample on the Geometry.</h4>
 </div>
-<div id="outline-container-sec-6-1-6" class="outline-4">
-<h4 id="sec-6-1-6"><span class="section-number-4">6.1.6</span> <span class="todo TODO">TODO</span> HklSample</h4>
-<div class="outline-text-4" id="text-6-1-6">
-</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> HklSample add the cell volum computation.<br/></li>
-<li><span class="todo TODO">TODO</span> unit test: hkl_sample_affine.<br/><div class="outline-text-5" id="text-6-1-6-2">
+<div id="outline-container-sec-7-1-9" class="outline-4">
+<h4 id="sec-7-1-9"><span class="section-number-4">7.1.9</span> <span class="todo TODO">TODO</span> HklSample</h4>
+<div class="outline-text-4" id="text-7-1-9">
+</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> unit test: hkl_sample_affine.<br/><div class="outline-text-5" id="text-7-1-9-1">
 <p>
 Check this:
 lattice=1.540000;1.540000;1.540000;90.000000;90.000000;90.000000;0;0;0;0;0;0
@@ -4357,16 +5210,21 @@ reflection=1.540000;0.206208;0.342357;-0.080346;1;0.000000;0.000000;0.000000;0.0
 A,  B, C, Alpha,  Beta, Gamma, Ux, Uy, Uy:
 17764892.133, 5793679.092, 15733785.198,  179.997,  179.999,452408725.23,  -575727594.04,  -1913661011.01 (affine) 1rst finetness
 </p>
+
+<p>
+all the reflections are non collinear the affine method should
+warn the user about this.
+</p>
 </div>
 </li></ol>
 </div>
 
-<div id="outline-container-sec-6-1-7" class="outline-4">
-<h4 id="sec-6-1-7"><span class="section-number-4">6.1.7</span> <span class="todo TODO">TODO</span> HklEngine "zone"</h4>
+<div id="outline-container-sec-7-1-10" class="outline-4">
+<h4 id="sec-7-1-10"><span class="section-number-4">7.1.10</span> <span class="todo TODO">TODO</span> HklEngine "zone"</h4>
 </div>
-<div id="outline-container-sec-6-1-8" class="outline-4">
-<h4 id="sec-6-1-8"><span class="section-number-4">6.1.8</span> <span class="todo TODO">TODO</span> HklEngine "custom"</h4>
-<div class="outline-text-4" id="text-6-1-8">
+<div id="outline-container-sec-7-1-11" class="outline-4">
+<h4 id="sec-7-1-11"><span class="section-number-4">7.1.11</span> <span class="todo TODO">TODO</span> HklEngine "custom"</h4>
+<div class="outline-text-4" id="text-7-1-11">
 <p>
 for now this pseudoaxis let you select the axis you
 want to use for the computation.
@@ -4374,22 +5232,22 @@ want to use for the computation.
 </div>
 </div>
 
-<div id="outline-container-sec-6-1-9" class="outline-4">
-<h4 id="sec-6-1-9"><span class="section-number-4">6.1.9</span> <span class="todo TODO">TODO</span> create a macro to help compare two real the right way</h4>
-<div class="outline-text-4" id="text-6-1-9">
+<div id="outline-container-sec-7-1-12" class="outline-4">
+<h4 id="sec-7-1-12"><span class="section-number-4">7.1.12</span> <span class="todo TODO">TODO</span> create a macro to help compare two real the right way</h4>
+<div class="outline-text-4" id="text-7-1-12">
 <p>
 fabs(a-b) < epsilon * max(1, abs(a), abs(b))
 </p>
 </div>
 </div>
 
-<div id="outline-container-sec-6-1-10" class="outline-4">
-<h4 id="sec-6-1-10"><span class="section-number-4">6.1.10</span> <span class="todo TODO">TODO</span> add an hkl_sample_set_lattice_unit()</h4>
+<div id="outline-container-sec-7-1-13" class="outline-4">
+<h4 id="sec-7-1-13"><span class="section-number-4">7.1.13</span> <span class="todo TODO">TODO</span> add an hkl_sample_set_lattice_unit()</h4>
 </div>
-<div id="outline-container-sec-6-1-11" class="outline-4">
-<h4 id="sec-6-1-11"><span class="section-number-4">6.1.11</span> <span class="todo TODO">TODO</span> SOLEIL SIXS</h4>
-<div class="outline-text-4" id="text-6-1-11">
-</div><ol class="org-ol"><li><span class="done DONE">DONE</span> find the right solutions.&#xa0;&#xa0;&#xa0;<span class="tag"><span class="zaxis">zaxis</span></span><br/><div class="outline-text-5" id="text-6-1-11-1">
+<div id="outline-container-sec-7-1-14" class="outline-4">
+<h4 id="sec-7-1-14"><span class="section-number-4">7.1.14</span> <span class="todo TODO">TODO</span> SOLEIL SIXS</h4>
+<div class="outline-text-4" id="text-7-1-14">
+</div><ol class="org-ol"><li><span class="done DONE">DONE</span> find the right solutions.&#xa0;&#xa0;&#xa0;<span class="tag"><span class="zaxis">zaxis</span></span><br/><div class="outline-text-5" id="text-7-1-14-1">
 <p>
 The cosinus and sinus properties are not enough to find the solution expected by the users.
 The idea is to use the Ewalds construction to generate a valid solution from the first one
@@ -4402,7 +5260,7 @@ special feature in the Mode. So it will be possible to add thoses special cases
 </div>
 </li>
 
-<li><span class="todo TODO">TODO</span> Add the DEP diffractometer geometry<br/><div class="outline-text-5" id="text-6-1-11-2">
+<li><span class="todo TODO">TODO</span> Add the DEP diffractometer geometry<br/><div class="outline-text-5" id="text-7-1-14-2">
 <p>
 This diffractometer is a Newport one based on the kappa 6 circles ones.
 But instead of a kappa head, they use an Hexapod head.
@@ -4412,9 +5270,9 @@ This head can be put horizontally or vertically.
 </li></ol>
 </div>
 
-<div id="outline-container-sec-6-1-12" class="outline-4">
-<h4 id="sec-6-1-12"><span class="section-number-4">6.1.12</span> <span class="todo TODO">TODO</span> generalisation of the z-axis hkl solver</h4>
-<div class="outline-text-4" id="text-6-1-12">
+<div id="outline-container-sec-7-1-15" class="outline-4">
+<h4 id="sec-7-1-15"><span class="section-number-4">7.1.15</span> <span class="todo TODO">TODO</span> generalisation of the z-axis hkl solver</h4>
+<div class="outline-text-4" id="text-7-1-15">
 <p>
 first we need the degenerated member of the Axis. thaht way it could be possible
 to find the last non degenerated axis for the detector fit.
@@ -4422,16 +5280,16 @@ to find the last non degenerated axis for the detector fit.
 </div>
 </div>
 
-<div id="outline-container-sec-6-1-13" class="outline-4">
-<h4 id="sec-6-1-13"><span class="section-number-4">6.1.13</span> <span class="todo TODO">TODO</span> investigate the prigo geometry.</h4>
+<div id="outline-container-sec-7-1-16" class="outline-4">
+<h4 id="sec-7-1-16"><span class="section-number-4">7.1.16</span> <span class="todo TODO">TODO</span> investigate the prigo geometry.</h4>
 </div>
-<div id="outline-container-sec-6-1-14" class="outline-4">
-<h4 id="sec-6-1-14"><span class="section-number-4">6.1.14</span> <span class="todo TODO">TODO</span> augeas/elektra for the plugin configure part.</h4>
+<div id="outline-container-sec-7-1-17" class="outline-4">
+<h4 id="sec-7-1-17"><span class="section-number-4">7.1.17</span> <span class="todo TODO">TODO</span> augeas/elektra for the plugin configure part.</h4>
 </div>
-<div id="outline-container-sec-6-1-15" class="outline-4">
-<h4 id="sec-6-1-15"><span class="section-number-4">6.1.15</span> <span class="todo TODO">TODO</span> logging</h4>
-<div class="outline-text-4" id="text-6-1-15">
-</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> <code>[1/2]</code> add in a few methods.<br/><div class="outline-text-5" id="text-6-1-15-1">
+<div id="outline-container-sec-7-1-18" class="outline-4">
+<h4 id="sec-7-1-18"><span class="section-number-4">7.1.18</span> <span class="todo TODO">TODO</span> logging</h4>
+<div class="outline-text-4" id="text-7-1-18">
+</div><ol class="org-ol"><li><span class="todo TODO">TODO</span> <code>[1/2]</code> add in a few methods.<br/><div class="outline-text-5" id="text-7-1-18-1">
 <ul class="org-ul">
 <li><code>[X]</code> hkl_pseudo_axes_values_set
 </li>
@@ -4441,7 +5299,7 @@ to find the last non degenerated axis for the detector fit.
 </div>
 </li>
 
-<li><span class="todo TODO">TODO</span> gir logging<br/><div class="outline-text-5" id="text-6-1-15-2">
+<li><span class="todo TODO">TODO</span> gir logging<br/><div class="outline-text-5" id="text-7-1-18-2">
 <p>
 It would be nice to generate the library logging using the .gir
 information. So instead of writing the logging code for each
@@ -4451,7 +5309,7 @@ purpose.
 </div>
 </li>
 
-<li><span class="todo TODO">TODO</span> parsable logging information.<br/><div class="outline-text-5" id="text-6-1-15-3">
+<li><span class="todo TODO">TODO</span> parsable logging information.<br/><div class="outline-text-5" id="text-7-1-18-3">
 <p>
 A parsable logging format would help to setup some re-play unit
 test. This way it could help during the developpement process
@@ -4462,23 +5320,26 @@ computation are ok.
 </li></ol>
 </div>
 
-<div id="outline-container-sec-6-1-16" class="outline-4">
-<h4 id="sec-6-1-16"><span class="section-number-4">6.1.16</span> <span class="todo TODO">TODO</span> performances</h4>
-<div class="outline-text-4" id="text-6-1-16">
-<p>
-Investigate <a href="http://liboil.freedesktop.org/wiki/">liboil</a> to speed calculation (in HklVector, HklMatrix
+<div id="outline-container-sec-7-1-19" class="outline-4">
+<h4 id="sec-7-1-19"><span class="section-number-4">7.1.19</span> <span class="todo TODO">TODO</span> performances</h4>
+<div class="outline-text-4" id="text-7-1-19">
+<ul class="org-ul">
+<li>Investigate <a href="http://liboil.freedesktop.org/wiki/">liboil</a> to speed calculation (in HklVector, HklMatrix
 and HklQuaternion)
-</p>
+</li>
+<li>Avoid to call <code>hkl_engine_prepare_internal</code> at each computation.
+</li>
+</ul>
 </div>
 </div>
 </div>
 
-<div id="outline-container-sec-6-2" class="outline-3">
-<h3 id="sec-6-2"><span class="section-number-3">6.2</span> documentation</h3>
-<div class="outline-text-3" id="text-6-2">
-</div><div id="outline-container-sec-6-2-1" class="outline-4">
-<h4 id="sec-6-2-1"><span class="section-number-4">6.2.1</span> <span class="todo TODO">TODO</span> <code>[1/6]</code> rewrite documentation in org-mode</h4>
-<div class="outline-text-4" id="text-6-2-1">
+<div id="outline-container-sec-7-2" class="outline-3">
+<h3 id="sec-7-2"><span class="section-number-3">7.2</span> documentation</h3>
+<div class="outline-text-3" id="text-7-2">
+</div><div id="outline-container-sec-7-2-1" class="outline-4">
+<h4 id="sec-7-2-1"><span class="section-number-4">7.2.1</span> <span class="todo TODO">TODO</span> <code>[1/6]</code> rewrite documentation in org-mode</h4>
+<div class="outline-text-4" id="text-7-2-1">
 <ul class="org-ul">
 <li><code>[-]</code> embedding code into the org file
 <ul class="org-ul">
@@ -4514,9 +5375,9 @@ python binding for all diffractometer geometries.
 </div>
 </div>
 
-<div id="outline-container-sec-6-3" class="outline-3">
-<h3 id="sec-6-3"><span class="section-number-3">6.3</span> <code>[0/3]</code> gui</h3>
-<div class="outline-text-3" id="text-6-3">
+<div id="outline-container-sec-7-3" class="outline-3">
+<h3 id="sec-7-3"><span class="section-number-3">7.3</span> <code>[0/3]</code> gui</h3>
+<div class="outline-text-3" id="text-7-3">
 <ul class="org-ul">
 <li><code>[&#xa0;]</code> change the color of fitparameter cells if they differ from
 the current sample values
@@ -4531,18 +5392,18 @@ pseudo axes and the mode parameters.
 </div>
 </div>
 
-<div id="outline-container-sec-6-4" class="outline-3">
-<h3 id="sec-6-4"><span class="section-number-3">6.4</span> hkl3d</h3>
-<div class="outline-text-3" id="text-6-4">
-</div><div id="outline-container-sec-6-4-1" class="outline-4">
-<h4 id="sec-6-4-1"><span class="section-number-4">6.4.1</span> <span class="todo TODO">TODO</span> add a method to find the 3D models in the right directories.</h4>
+<div id="outline-container-sec-7-4" class="outline-3">
+<h3 id="sec-7-4"><span class="section-number-3">7.4</span> hkl3d</h3>
+<div class="outline-text-3" id="text-7-4">
+</div><div id="outline-container-sec-7-4-1" class="outline-4">
+<h4 id="sec-7-4-1"><span class="section-number-4">7.4.1</span> <span class="todo TODO">TODO</span> add a method to find the 3D models in the right directories.</h4>
 </div>
 </div>
-<div id="outline-container-sec-6-5" class="outline-3">
-<h3 id="sec-6-5"><span class="section-number-3">6.5</span> packaging</h3>
-<div class="outline-text-3" id="text-6-5">
-</div><div id="outline-container-sec-6-5-1" class="outline-4">
-<h4 id="sec-6-5-1"><span class="section-number-4">6.5.1</span> <span class="todo TODO">TODO</span> add a .spec file for rpm generation.</h4>
+<div id="outline-container-sec-7-5" class="outline-3">
+<h3 id="sec-7-5"><span class="section-number-3">7.5</span> packaging</h3>
+<div class="outline-text-3" id="text-7-5">
+</div><div id="outline-container-sec-7-5-1" class="outline-4">
+<h4 id="sec-7-5-1"><span class="section-number-4">7.5.1</span> <span class="todo TODO">TODO</span> add a .spec file for rpm generation.</h4>
 </div>
 </div>
 </div>
@@ -4563,8 +5424,8 @@ pseudo axes and the mode parameters.
 </div></div>
 <div id="postamble" class="status">
 <p class="author">Author: Picca Frédéric-Emmanuel</p>
-<p class="date">Created: 2015-03-09 lun. 09:27</p>
-<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 23.4.1 (<a href="http://orgmode.org">Org</a> mode 8.0.7)</p>
+<p class="date">Created: 2015-05-04 lun. 10:39</p>
+<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.4.1 (<a href="http://orgmode.org">Org</a> mode 8.0.7)</p>
 <p class="xhtml-validation"><a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a></p>
 </div>
 </body>
diff --git a/Documentation/hkl.org.in b/Documentation/hkl.org.in
index 9cbea74..a91f562 100644
--- a/Documentation/hkl.org.in
+++ b/Documentation/hkl.org.in
@@ -6,7 +6,7 @@
 #+STYLE: <style>table.center {margin-left:auto; margin- right:auto;}</style>
 
 * Introduction
-  The purpose of the library is to factorise single crystal
+  The purpose of the library is to factorize single crystal
   diffraction angles computation for different kind of diffractometer
   geometries. It is used at the SOLEIL, Desy and Alba synchrotron with
   the Tango control system to pilot diffractometers.
@@ -18,7 +18,7 @@
      - simplex computation with more than 2 reflections using the GSL
        library.
      - Eulerians angles to pre-orientate your sample.
-   - Crystal lattice affinement
+   - Crystal lattice refinement
      - with more than 2 reflections you can select which parameter must
        be fitted.
    - Pseudoaxes
@@ -42,7 +42,7 @@
     \end{displaymath}
 
     $\vec{a}$, $\vec{b}$, $\vec{c}$ are the former vector of a base of the
-    space. =u=, =v=, =w= are integrers. The pattern contain atomes
+    space. =u=, =v=, =w= are integers. The pattern contain atoms
     associated to each lattice node. the purpose of diffraction is to study
     the interaction of this crystal (pattern+lattice) with X-rays.
 
@@ -51,7 +51,7 @@
 
     this lattice is defined by $\vec{a}$, $\vec{b}$, $\vec{c}$ vectors, and
     the angles $\alpha$, $\beta$, $\gamma$. In general cases this lattice is
-    not othonormal.
+    not orthonormal.
 
     Nevertheless to compute the interaction of this real space lattice and
     the X-Rays, it is convenient to define another lattice called reciprocal
@@ -65,7 +65,7 @@
 
     $\tau=2\pi$ or $\tau=1$ depending on the conventions.
 
-    It is then possible to define thoses orthogonal properties:
+    It is then possible to define theses orthogonal properties:
 
     \begin{eqnarray*}
     \vec{a}^{\star}\cdot\vec{a}=\tau & \vec{b}^{\star}\cdot\vec{a}=0    & \vec{c}^{\star}\cdot\vec{a}=0\\
@@ -94,7 +94,7 @@
 
     To compute the angles between the reciprocal space vectors, it is once
     again possible to use the previous equations reciprocal to obtain the
-    sinus and cosinus of the angles $\alpha^\star$, $\beta^\star$ et
+    sines and cosines of the angles $\alpha^\star$, $\beta^\star$ and
     $\gamma^\star$:
 
     \begin{eqnarray*}
@@ -103,9 +103,22 @@
     \cos\gamma^{\star}=\frac{\cos\alpha\cos\beta-\cos\gamma}{\sin\alpha\sin\beta} & \, & \sin\gamma^{\star}=\frac{D}{\sin\alpha\sin\beta}
     \end{eqnarray*}
 
+    the volume of the lattice can be compute this way:
+
+    \begin{displaymath}
+    V = abcD
+    \end{displaymath}
+
+    or
+
+    \begin{displaymath}
+    V = \vec{a} \dot (\vec{b} \wedge \vec{c}) = \vec{b} \dot (\vec{c} \wedge \vec{a}) = \vec{c} \dot (\vec{a} \wedge \vec{b})
+    \end{displaymath}
+
+
 *** Diffraction
 
-    Let the incomming X-rays beam whose wave vector is $\vec{k_{i}}$,
+    Let the incoming X-rays beam whose wave vector is $\vec{k_{i}}$,
     $|k_{i}|=\tau/\lambda$ where $\lambda$ is the wavelength of the signal.
     The $\vec{k_{d}}$ vector wavelength of the diffracted beam. There is
     diffusion if the diffusion vector $\vec{q}$ can be expressed as follows:
@@ -114,7 +127,7 @@
     \vec{q}=\vec{k_{d}}-\vec{k_{i}}=h.\vec{a}^{*}+k.\vec{b}^{*}+l.\vec{c}^{*}
     \end{displaymath}
 
-    where $(h,k,l)\in\mathbb{N}^{3}$ and $(h,k,l)\neq(0,0,0)$. Thoses
+    where $(h,k,l)\in\mathbb{N}^{3}$ and $(h,k,l)\neq(0,0,0)$. Theses
     indices $(h,k,l)$ are named Miller indices.
 
     Another way of looking at things has been given by Bragg and that famous
@@ -126,8 +139,8 @@
 
     where $d$ is the inter-plan distance and $n \in \mathbb{N}$.
 
-    The diffusion accure for a unique $\theta$ angle. Then we got $\vec{q}$
-    perpendicular to the diffraction plan.
+    The diffusion occurs for an unique $\theta$ angle. Then we got
+    $\vec{q}$ perpendicular to the diffraction plan.
 
     The Ewald construction allow to represent this diffraction in the
     reciprocal space.
@@ -135,8 +148,8 @@
 *** Quaternions
 **** Properties
 
-     The quaternions will be used to discribe the diffractometers geometries.
-     Thoses quaternions can represent 3D rotations. There is different way to
+     The quaternions will be used to describe the diffractometers geometries.
+     Theses quaternions can represent 3D rotations. There is different way to
      describe then like complex numbers.
 
      \begin{displaymath}
@@ -164,7 +177,7 @@
 
 **** Operations
 
-     The difference with the complexnumber algebre is about
+     The difference with the complex number algebra is about
      non-commutativity.
 
      \begin{displaymath}
@@ -611,7 +624,7 @@ git clone git://repo.or.cz/hkl.git
 
    You just need to send an [[mailto:submit at bugs.debian.org?subject=%20My%20problem%20with%20hkl...&body=Package:%20hkl%0AVersion:%20 at VERSION@%0A%0AI%20found%20this%20problem%20in%20hkl][email]]
 
-*** Providing patchs
+*** Providing patches
 
     you can send your patch to [[picca at synchrotron-soleil.fr][Picca
     Frédéric-Emmanuel]] using =git=
@@ -799,8 +812,67 @@ git clone git://repo.or.cz/hkl.git
    use only the closest solution for the next points of the trajectory.
    (first solution of the geometries list)
    #+END_QUOTE
+* Releases
+** @VERSION@
+*** DONE =HklLattice= add an =hkl_lattice_volume_get=
+#+BEGIN_SRC c
+  volume = hkl_lattice_volume_get(lattice);
+#+END_SRC
+*** DONE =HklEngine=
+**** "nrj, sample, ...  dependencies" <2015-03-24 mar.>
+     Add the =hkl_engine_dependencies_get= method which return if the
+     =HklEngine= depends of the axes, the energy, or the sample. the
+     possible values are stored in the =HklEngineDependencies= enum.
+
+#+BEGIN_SRC c
+  dependencies = hkl_engine_dependencies_get(engine);
+  if (dependencies & HKL_ENGINE_DEPENDENCIES_ENERGY) {
+          ...
+  }
+  if (dependencies & HKL_ENGINE_DEPENDENCIES_SAMPLE) {
+          ...
+  }
+  ...
+#+END_SRC
+**** "tth2" <2015-04-03 ven>
+     Add a new hkl engine which contain two pseudo axes.
+     + =tth=  two times the diffraction angle $\theta$
+     + =alpha= the azimuth of q in the zOy plan.
+**** "incidence" <2015-04-21 mar.>
+     Add a new incidence engine which contain only one pseudo axis.
+     + =incidence= the incoming beam incidence on the sample surface.
+     + =azimuth= the sample surface azimuth.
+**** =hkl_engine_parameter_set= <2015-05-04 lun.>
+     Fix a bug and expose the method in the binding.
+**** general
+     - use #define AXIS "axis_name" in all the code to set the axes
+       names at only one place. <2015-04-23 jeu.>
+*** DONE =HklLattice= expose in the binding the _x_get/set methods <2015-03-24 mar.>
+    Now you can use hkl_lattice_x_get where x=a, b, c, alpha, beta,
+    gamma in the bindings.
+#+BEGIN_SRC python :export code
+  a = lattice.a_get()
+  lattice.a_set(a)
+#+END_SRC
+*** DONE =HklSampleReflection= expose the flag_get/set and geometry_get/set method <2015-03-24 mar.>
+    It is now possible to change the geometry stored in a reflection
+    via the bindings.
+#+BEGIN_SRC python :export code
+  flag = reflection.flag_get()
+  reflection.flag_set(flag)
+
+  geometry = reflection.geometry_get()
+  geometry.axes_values_set([omega, chi, phi, ...])
+  reflection.geometry_set(geometry)
+#+END_SRC
 * Todo
 ** hkl
+*** TODO [#A] [0/2] HklEngine "read_only"
+    * [ ] "beta" emergence angle
+*** TODO [#A] HklSource
+    Create a parameter for the wavelength. This is just internally for
+    the futur trajectory system, so no need to change the signature of
+    hkl_geometry_vawelength get/set
 *** TODO [0/2] PetraIII
 **** TODO computation problem
      Dear Teresa,
@@ -914,15 +986,14 @@ git clone git://repo.or.cz/hkl.git
       to the axis. that way it would be possible to check a posteriori
       for this degenerescencence.
     - [ ] Add a description for each parameters.
-      This will help for the documentation and the gui.
+*** TODO This will help for the documentation and the gui.
 *** TODO HklGeometryList different method to help select a solution.
     this select solution can depend on the geometry
     for example the kappa axis must be in one side of the plane.
 *** TODO add a fit on the Hklaxis offsets.
 *** TODO API to put a detector and a sample on the Geometry.
 *** TODO HklSample
-**** TODO HklSample add the cell volum computation.
-**** TODO unit test: hkl_sample_affine.
+**** TODO [#B] unit test: hkl_sample_affine.
      Check this:
      lattice=1.540000;1.540000;1.540000;90.000000;90.000000;90.000000;0;0;0;0;0;0
      uxuyuz=0.000000;0.000000;0.000000
@@ -932,6 +1003,9 @@ git clone git://repo.or.cz/hkl.git
 
      A,  B, C, Alpha,  Beta, Gamma, Ux, Uy, Uy:
      17764892.133, 5793679.092, 15733785.198,  179.997,  179.999,452408725.23,  -575727594.04,  -1913661011.01 (affine) 1rst finetness
+
+     all the reflections are non collinear the affine method should
+     warn the user about this.
 *** TODO HklEngine "zone"
 *** TODO HklEngine "custom"
     for now this pseudoaxis let you select the axis you
@@ -972,8 +1046,9 @@ git clone git://repo.or.cz/hkl.git
      (modification of the hkl internals) to be confident that
      computation are ok.
 *** TODO performances
-    Investigate [[http://liboil.freedesktop.org/wiki/][liboil]] to speed calculation (in HklVector, HklMatrix
-    and HklQuaternion)
+    + Investigate [[http://liboil.freedesktop.org/wiki/][liboil]] to speed calculation (in HklVector, HklMatrix
+      and HklQuaternion)
+    + Avoid to call =hkl_engine_prepare_internal= at each computation.
 ** documentation
 *** TODO [1/6] rewrite documentation in org-mode
     - [-] embedding code into the org file
diff --git a/configure b/configure
index 1c7557e..eb31862 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for hkl 4.99.99.1914.
+# Generated by GNU Autoconf 2.69 for hkl 4.99.99.1940.
 #
 # Report bugs to <picca at synchrotron-soleil.fr>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='hkl'
 PACKAGE_TARNAME='hkl'
-PACKAGE_VERSION='4.99.99.1914'
-PACKAGE_STRING='hkl 4.99.99.1914'
+PACKAGE_VERSION='4.99.99.1940'
+PACKAGE_STRING='hkl 4.99.99.1940'
 PACKAGE_BUGREPORT='picca at synchrotron-soleil.fr'
 PACKAGE_URL=''
 
@@ -1421,7 +1421,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures hkl 4.99.99.1914 to adapt to many kinds of systems.
+\`configure' configures hkl 4.99.99.1940 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1491,7 +1491,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of hkl 4.99.99.1914:";;
+     short | recursive ) echo "Configuration of hkl 4.99.99.1940:";;
    esac
   cat <<\_ACEOF
 
@@ -1638,7 +1638,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-hkl configure 4.99.99.1914
+hkl configure 4.99.99.1940
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2312,7 +2312,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by hkl $as_me 4.99.99.1914, which was
+It was created by hkl $as_me 4.99.99.1940, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3171,7 +3171,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='hkl'
- VERSION='4.99.99.1914'
+ VERSION='4.99.99.1940'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15754,7 +15754,7 @@ _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define VREV 1914
+#define VREV 1940
 _ACEOF
 
 version_info="103:99:99"
@@ -19173,7 +19173,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by hkl $as_me 4.99.99.1914, which was
+This file was extended by hkl $as_me 4.99.99.1940, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19239,7 +19239,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-hkl config.status 4.99.99.1914
+hkl config.status 4.99.99.1940
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/gui/hkl-gui-3d.c b/gui/hkl-gui-3d.c
index ad99a5b..c794d0c 100644
--- a/gui/hkl-gui-3d.c
+++ b/gui/hkl-gui-3d.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/gui/hkl-gui-3d.h b/gui/hkl-gui-3d.h
index 6820498..29f091b 100644
--- a/gui/hkl-gui-3d.h
+++ b/gui/hkl-gui-3d.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/gui/hkl-gui-macros.h b/gui/hkl-gui-macros.h
index 3594531..3031615 100644
--- a/gui/hkl-gui-macros.h
+++ b/gui/hkl-gui-macros.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/gui/hkl-gui.c b/gui/hkl-gui.c
index 066f8be..6b052ad 100644
--- a/gui/hkl-gui.c
+++ b/gui/hkl-gui.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/gui/hkl-gui.h b/gui/hkl-gui.h
index add4de3..dbc7f1d 100644
--- a/gui/hkl-gui.h
+++ b/gui/hkl-gui.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl.h b/hkl.h
index 80d808e..cbcb5b7 100644
--- a/hkl.h
+++ b/hkl.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -331,6 +331,8 @@ HKLAPI const HklParameter *hkl_lattice_gamma_get(const HklLattice *self) HKL_ARG
 HKLAPI int hkl_lattice_gamma_set(HklLattice *self, const HklParameter *parameter,
 				 GError **error) HKL_ARG_NONNULL(1, 2) HKL_WARN_UNUSED_RESULT;
 
+HKLAPI const HklParameter *hkl_lattice_volume_get(const HklLattice *self) HKL_ARG_NONNULL(1);
+
 HKLAPI int hkl_lattice_set(HklLattice *self,
 			   double a, double b, double c,
 			   double alpha, double beta, double gamma,
@@ -521,6 +523,16 @@ HKLAPI int hkl_engine_parameters_values_set(HklEngine *self,
 					    double values[], size_t n_values,
 					    HklUnitEnum unit_type, GError **error) HKL_ARG_NONNULL(1, 2) HKL_WARN_UNUSED_RESULT;
 
+typedef enum _HklEngineDependencies
+{
+	HKL_ENGINE_DEPENDENCIES_AXES = 1u << 0,
+	HKL_ENGINE_DEPENDENCIES_ENERGY = 1u << 1,
+	HKL_ENGINE_DEPENDENCIES_SAMPLE = 1u << 2,
+} HklEngineDependencies;
+
+HKLAPI unsigned int hkl_engine_dependencies_get(const HklEngine *self) HKL_ARG_NONNULL(1);
+
+
 /* HklEngineList */
 
 HKLAPI void hkl_engine_list_free(HklEngineList *self) HKL_ARG_NONNULL(1);
diff --git a/hkl/Makefile.am b/hkl/Makefile.am
index f162757..a0339e4 100644
--- a/hkl/Makefile.am
+++ b/hkl/Makefile.am
@@ -29,6 +29,8 @@ hkl_c_sources = \
 	hkl-pseudoaxis-common-hkl.c \
 	hkl-pseudoaxis-common-psi.c \
 	hkl-pseudoaxis-common-q.c \
+	hkl-pseudoaxis-common-readonly.c \
+	hkl-pseudoaxis-common-tth.c \
 	hkl-engine-2c.c \
 	hkl-engine-e4c.c \
 	hkl-engine-k4c.c \
@@ -60,8 +62,10 @@ hkl_private_h_sources = \
 	hkl-pseudoaxis-auto-private.h \
 	hkl-pseudoaxis-common-eulerians-private.h \
 	hkl-pseudoaxis-common-hkl-private.h \
-	hkl-pseudoaxis-common-q-private.h \
 	hkl-pseudoaxis-common-psi-private.h \
+	hkl-pseudoaxis-common-q-private.h \
+	hkl-pseudoaxis-common-readonly-private.h \
+	hkl-pseudoaxis-common-tth-private.h \
 	hkl-quaternion-private.h \
 	hkl-sample-private.h \
 	hkl-source-private.h \
diff --git a/hkl/Makefile.in b/hkl/Makefile.in
index 5ac3cc3..339ff18 100644
--- a/hkl/Makefile.in
+++ b/hkl/Makefile.in
@@ -119,6 +119,7 @@ am__libhkl_la_SOURCES_DIST = hkl-axis.c hkl-detector.c \
 	hkl-parameter.c hkl-pseudoaxis.c hkl-pseudoaxis-auto.c \
 	hkl-pseudoaxis-common-eulerians.c hkl-pseudoaxis-common-hkl.c \
 	hkl-pseudoaxis-common-psi.c hkl-pseudoaxis-common-q.c \
+	hkl-pseudoaxis-common-readonly.c hkl-pseudoaxis-common-tth.c \
 	hkl-engine-2c.c hkl-engine-e4c.c hkl-engine-k4c.c \
 	hkl-engine-e6c.c hkl-engine-k6c.c hkl-engine-petra3-p09-eh2.c \
 	hkl-engine-soleil-sirius-turret.c hkl-engine-soleil-sixs-med.c \
@@ -131,8 +132,10 @@ am__libhkl_la_SOURCES_DIST = hkl-axis.c hkl-detector.c \
 	hkl-pseudoaxis-private.h hkl-pseudoaxis-auto-private.h \
 	hkl-pseudoaxis-common-eulerians-private.h \
 	hkl-pseudoaxis-common-hkl-private.h \
+	hkl-pseudoaxis-common-psi-private.h \
 	hkl-pseudoaxis-common-q-private.h \
-	hkl-pseudoaxis-common-psi-private.h hkl-quaternion-private.h \
+	hkl-pseudoaxis-common-readonly-private.h \
+	hkl-pseudoaxis-common-tth-private.h hkl-quaternion-private.h \
 	hkl-sample-private.h hkl-source-private.h hkl-unit-private.h \
 	hkl-vector-private.h hkl-types.c hkl-types.h \
 	hkl-type-builtins.c hkl-type-builtins.h hkl-binding.c \
@@ -147,6 +150,8 @@ am__objects_1 = libhkl_la-hkl-axis.lo libhkl_la-hkl-detector.lo \
 	libhkl_la-hkl-pseudoaxis-common-hkl.lo \
 	libhkl_la-hkl-pseudoaxis-common-psi.lo \
 	libhkl_la-hkl-pseudoaxis-common-q.lo \
+	libhkl_la-hkl-pseudoaxis-common-readonly.lo \
+	libhkl_la-hkl-pseudoaxis-common-tth.lo \
 	libhkl_la-hkl-engine-2c.lo libhkl_la-hkl-engine-e4c.lo \
 	libhkl_la-hkl-engine-k4c.lo libhkl_la-hkl-engine-e6c.lo \
 	libhkl_la-hkl-engine-k6c.lo \
@@ -431,6 +436,8 @@ hkl_c_sources = \
 	hkl-pseudoaxis-common-hkl.c \
 	hkl-pseudoaxis-common-psi.c \
 	hkl-pseudoaxis-common-q.c \
+	hkl-pseudoaxis-common-readonly.c \
+	hkl-pseudoaxis-common-tth.c \
 	hkl-engine-2c.c \
 	hkl-engine-e4c.c \
 	hkl-engine-k4c.c \
@@ -461,8 +468,10 @@ hkl_private_h_sources = \
 	hkl-pseudoaxis-auto-private.h \
 	hkl-pseudoaxis-common-eulerians-private.h \
 	hkl-pseudoaxis-common-hkl-private.h \
-	hkl-pseudoaxis-common-q-private.h \
 	hkl-pseudoaxis-common-psi-private.h \
+	hkl-pseudoaxis-common-q-private.h \
+	hkl-pseudoaxis-common-readonly-private.h \
+	hkl-pseudoaxis-common-tth-private.h \
 	hkl-quaternion-private.h \
 	hkl-sample-private.h \
 	hkl-source-private.h \
@@ -640,6 +649,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-hkl.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-psi.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-q.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-readonly.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-tth.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-pseudoaxis.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-quaternion.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhkl_la-hkl-sample.Plo at am__quote@
@@ -785,6 +796,20 @@ libhkl_la-hkl-pseudoaxis-common-q.lo: hkl-pseudoaxis-common-q.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -c -o libhkl_la-hkl-pseudoaxis-common-q.lo `test -f 'hkl-pseudoaxis-common-q.c' || echo '$(srcdir)/'`hkl-pseudoaxis-common-q.c
 
+libhkl_la-hkl-pseudoaxis-common-readonly.lo: hkl-pseudoaxis-common-readonly.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -MT libhkl_la-hkl-pseudoaxis-common-readonly.lo -MD -MP -MF $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-readonly.Tpo -c -o libhkl_la-hkl-pseudoaxis-common-readonly.lo `test -f 'hkl-pseudoaxis-common-readonly.c' || echo '$(srcdir)/'`hkl-pseudoaxis-common-readonly.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-readonly.Tpo $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-readonly.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hkl-pseudoaxis-common-readonly.c' object='libhkl_la-hkl-pseudoaxis-common-readonly.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -c -o libhkl_la-hkl-pseudoaxis-common-readonly.lo `test -f 'hkl-pseudoaxis-common-readonly.c' || echo '$(srcdir)/'`hkl-pseudoaxis-common-readonly.c
+
+libhkl_la-hkl-pseudoaxis-common-tth.lo: hkl-pseudoaxis-common-tth.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -MT libhkl_la-hkl-pseudoaxis-common-tth.lo -MD -MP -MF $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-tth.Tpo -c -o libhkl_la-hkl-pseudoaxis-common-tth.lo `test -f 'hkl-pseudoaxis-common-tth.c' || echo '$(srcdir)/'`hkl-pseudoaxis-common-tth.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-tth.Tpo $(DEPDIR)/libhkl_la-hkl-pseudoaxis-common-tth.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hkl-pseudoaxis-common-tth.c' object='libhkl_la-hkl-pseudoaxis-common-tth.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -c -o libhkl_la-hkl-pseudoaxis-common-tth.lo `test -f 'hkl-pseudoaxis-common-tth.c' || echo '$(srcdir)/'`hkl-pseudoaxis-common-tth.c
+
 libhkl_la-hkl-engine-2c.lo: hkl-engine-2c.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhkl_la_CFLAGS) $(CFLAGS) -MT libhkl_la-hkl-engine-2c.lo -MD -MP -MF $(DEPDIR)/libhkl_la-hkl-engine-2c.Tpo -c -o libhkl_la-hkl-engine-2c.lo `test -f 'hkl-engine-2c.c' || echo '$(srcdir)/'`hkl-engine-2c.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhkl_la-hkl-engine-2c.Tpo $(DEPDIR)/libhkl_la-hkl-engine-2c.Plo
diff --git a/hkl/hkl-axis-private.h b/hkl/hkl-axis-private.h
index 8f19ed7..2d43eda 100644
--- a/hkl/hkl-axis-private.h
+++ b/hkl/hkl-axis-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-axis.c b/hkl/hkl-axis.c
index 58fab99..8d05f20 100644
--- a/hkl/hkl-axis.c
+++ b/hkl/hkl-axis.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-binding-private.h b/hkl/hkl-binding-private.h
index 28b0c4a..9e4e05e 100644
--- a/hkl/hkl-binding-private.h
+++ b/hkl/hkl-binding-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2012-2014 Synchrotron SOLEIL
+ * Copyright (C) 2012-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-binding.c b/hkl/hkl-binding.c
index 1eb5d38..fdedcea 100644
--- a/hkl/hkl-binding.c
+++ b/hkl/hkl-binding.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2012-2014 Synchrotron SOLEIL
+ * Copyright (C) 2012-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-detector-factory.c b/hkl/hkl-detector-factory.c
index 754c478..658901e 100644
--- a/hkl/hkl-detector-factory.c
+++ b/hkl/hkl-detector-factory.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-detector-private.h b/hkl/hkl-detector-private.h
index 152c76d..868537a 100644
--- a/hkl/hkl-detector-private.h
+++ b/hkl/hkl-detector-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-detector.c b/hkl/hkl-detector.c
index d58e534..949b933 100644
--- a/hkl/hkl-detector.c
+++ b/hkl/hkl-detector.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-engine-2c.c b/hkl/hkl-engine-2c.c
index 5cbbc49..1bd46cb 100644
--- a/hkl/hkl-engine-2c.c
+++ b/hkl/hkl-engine-2c.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -24,20 +24,20 @@
 #include "hkl-pseudoaxis-private.h"     // for hkl_engine_list_add, etc
 #include "hkl/ccan/array_size/array_size.h"
 
-#define AXIS_0_NAME "omega"
-#define AXIS_1_NAME "tth"
+#define OMEGA "omega"
+#define TTH "tth"
 
 #define HKL_GEOMETRY_TWOC_DESCRIPTION					\
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 1 axes for the sample\n"					\
 	"\n"								\
-	"  + **" AXIS_0_NAME "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 1 axis for the detector\n"					\
 	"\n"								\
-	"  + **" AXIS_1_NAME "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" TTH "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_twoC_axes[] = {AXIS_0_NAME, AXIS_1_NAME};
+static const char* hkl_geometry_twoC_axes[] = {OMEGA, TTH};
 
 static HklGeometry *hkl_geometry_new_twoC(const HklFactory *factory)
 {
@@ -45,10 +45,10 @@ static HklGeometry *hkl_geometry_new_twoC(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, AXIS_0_NAME, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, AXIS_1_NAME, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, TTH, 0, -1, 0);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-e4c.c b/hkl/hkl-engine-e4c.c
index 8541c56..f602516 100644
--- a/hkl/hkl-engine-e4c.c
+++ b/hkl/hkl-engine-e4c.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -24,8 +24,16 @@
 #include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for hkl_mode_operations, etc
 #include "hkl-pseudoaxis-common-psi-private.h"  // for hkl_engine_psi_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
 
-/* bissector */
+#define OMEGA "omega"
+#define CHI "chi"
+#define PHI "phi"
+#define TTH "tth"
+
+/************/
+/* mode hkl */
+/************/
 
 static int _bissector_func(const gsl_vector *x, void *params, gsl_vector *f)
 {
@@ -47,7 +55,7 @@ static const HklFunction bissector_func = {
 
 static HklMode *bissector(void)
 {
-	static const char* axes[] = {"omega", "chi", "phi", "tth"};
+	static const char* axes[] = {OMEGA, CHI, PHI, TTH};
 	static const HklFunction *functions[] = {&bissector_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes, axes, functions),
@@ -60,8 +68,8 @@ static HklMode *bissector(void)
 
 static HklMode *constant_omega(void)
 {
-	static const char* axes_r[] = {"omega", "chi", "phi", "tth"};
-	static const char* axes_w[] = {"chi", "phi", "tth"};
+	static const char* axes_r[] = {OMEGA, CHI, PHI, TTH};
+	static const char* axes_w[] = {CHI, PHI, TTH};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -74,8 +82,8 @@ static HklMode *constant_omega(void)
 
 static HklMode *constant_chi(void)
 {
-	static const char* axes_r[] = {"omega", "chi", "phi", "tth"};
-	static const char* axes_w[] = {"omega", "phi", "tth"};
+	static const char* axes_r[] = {OMEGA, CHI, PHI, TTH};
+	static const char* axes_w[] = {OMEGA, PHI, TTH};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -88,8 +96,8 @@ static HklMode *constant_chi(void)
 
 static HklMode *constant_phi(void)
 {
-	static const char* axes_r[] = {"omega", "chi", "phi", "tth"};
-	static const char* axes_w[] = {"omega", "chi", "tth"};
+	static const char* axes_r[] = {OMEGA, CHI, PHI, TTH};
+	static const char* axes_w[] = {OMEGA, CHI, TTH};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -102,7 +110,7 @@ static HklMode *constant_phi(void)
 
 static HklMode *double_diffraction(void)
 {
-	static const char* axes[] = {"omega", "chi", "phi", "tth"};
+	static const char* axes[] = {OMEGA, CHI, PHI, TTH};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -116,7 +124,7 @@ static HklMode *double_diffraction(void)
 
 static HklMode *psi_constant(void)
 {
-	static const char* axes[] = {"omega", "chi", "phi", "tth"};
+	static const char* axes[] = {OMEGA, CHI, PHI, TTH};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -128,16 +136,12 @@ static HklMode *psi_constant(void)
 				 TRUE);
 }
 
-/***********************/
-/* pseudo axes engines */
-/***********************/
-
-static HklEngine *hkl_engine_e4c_hkl_new(void)
+static HklEngine *hkl_engine_e4c_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector();
 	hkl_engine_add_mode(self, default_mode);
@@ -152,9 +156,13 @@ static HklEngine *hkl_engine_e4c_hkl_new(void)
 	return self;
 }
 
+/************/
+/* mode psi */
+/************/
+
 static HklMode *psi(void)
 {
-	static const char *axes[] = {"omega", "chi", "phi", "tth"};
+	static const char *axes[] = {OMEGA, CHI, PHI, TTH};
 	static const HklFunction *functions[] = {&psi_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -164,12 +172,12 @@ static HklMode *psi(void)
 	return hkl_mode_psi_new(&info);
 }
 
-static HklEngine *hkl_engine_e4c_psi_new(void)
+static HklEngine *hkl_engine_e4c_psi_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_psi_new();
+	self = hkl_engine_psi_new(engines);
 
 	default_mode = psi();
 	hkl_engine_add_mode(self, default_mode);
@@ -178,6 +186,14 @@ static HklEngine *hkl_engine_e4c_psi_new(void)
 	return self;
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *e4c_incidence_axes[] = {OMEGA, CHI, PHI};
+
+REGISTER_INCIDENCE_ENGINE(e4c);
+
 /********/
 /* E4CV */
 /********/
@@ -186,15 +202,15 @@ static HklEngine *hkl_engine_e4c_psi_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **omega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **chi** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"  + **phi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 1 axis for the detector\n"					\
 	"\n"								\
-	"  + **tth** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" TTH "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_eulerian4C_vertical_axes[] = {"omega", "chi", "phi", "tth"};
+static const char* hkl_geometry_eulerian4C_vertical_axes[] = {OMEGA, CHI, PHI, TTH};
 
 static HklGeometry *hkl_geometry_new_eulerian4C_vertical(const HklFactory *factory)
 {
@@ -202,12 +218,12 @@ static HklGeometry *hkl_geometry_new_eulerian4C_vertical(const HklFactory *facto
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "chi", 1, 0, 0);
-	hkl_holder_add_rotation_axis(h, "phi", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, CHI, 1, 0, 0);
+	hkl_holder_add_rotation_axis(h, PHI, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "tth", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, TTH, 0, -1, 0);
 
 	return self;
 }
@@ -216,9 +232,10 @@ static HklEngineList *hkl_engine_list_new_eulerian4C_vertical(const HklFactory *
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_e4c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_e4c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q_new());
+	hkl_engine_e4c_hkl_new(self);
+	hkl_engine_e4c_psi_new(self);
+	hkl_engine_q_new(self);
+	hkl_engine_e4c_incidence_new(self);
 
 	return self;
 }
@@ -234,15 +251,15 @@ REGISTER_DIFFRACTOMETER(eulerian4C_vertical, "E4CV", HKL_GEOMETRY_EULERIAN4C_VER
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **omega** : rotating around the :math:`\\vec{z}` direction (0, -1, 0)\n" \
-	"  + **chi** : rotating around the :math:`\\vec{x}` direction (-1, 0, 0)\n" \
-	"  + **phi** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`\\vec{z}` direction (0, -1, 0)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (-1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
 	"\n"								\
 	"+ 1 axis for the detector\n"					\
 	"\n"								\
-	"  + **tth** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n"
+	"  + **" TTH "** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_soleil_mars_axes[] = {"omega", "chi", "phi", "tth"};
+static const char* hkl_geometry_soleil_mars_axes[] = {OMEGA, CHI, PHI, TTH};
 
 static HklGeometry *hkl_geometry_new_soleil_mars(const HklFactory *factory)
 {
@@ -250,12 +267,12 @@ static HklGeometry *hkl_geometry_new_soleil_mars(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "chi", -1, 0, 0);
-	hkl_holder_add_rotation_axis(h, "phi", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, CHI, -1, 0, 0);
+	hkl_holder_add_rotation_axis(h, PHI, 0, 0, 1);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "tth", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, TTH, 0, -1, 0);
 
 	return self;
 }
@@ -264,9 +281,10 @@ static HklEngineList *hkl_engine_list_new_soleil_mars(const HklFactory *factory)
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_e4c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_e4c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q_new());
+	hkl_engine_e4c_hkl_new(self);
+	hkl_engine_e4c_psi_new(self);
+	hkl_engine_q_new(self);
+	hkl_engine_e4c_incidence_new(self);
 
 	return self;
 }
@@ -281,15 +299,15 @@ REGISTER_DIFFRACTOMETER(soleil_mars, "SOLEIL MARS", HKL_GEOMETRY_TYPE_SOLEIL_MAR
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **omega** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **chi** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"  + **phi** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
 	"\n"								\
 	"+ 1 axis for the detector\n"					\
 	"\n"								\
-	"  + **tth** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n"
+	"  + **" TTH "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n"
 
-static const char* hkl_geometry_eulerian4C_horizontal_axes[] = {"omega", "chi", "phi", "tth"};
+static const char* hkl_geometry_eulerian4C_horizontal_axes[] = {OMEGA, CHI, PHI, TTH};
 
 static HklGeometry *hkl_geometry_new_eulerian4C_horizontal(const HklFactory *factory)
 {
@@ -297,12 +315,12 @@ static HklGeometry *hkl_geometry_new_eulerian4C_horizontal(const HklFactory *fac
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "omega", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "chi", 1, 0, 0);
-	hkl_holder_add_rotation_axis(h, "phi", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, CHI, 1, 0, 0);
+	hkl_holder_add_rotation_axis(h, PHI, 0, 0, 1);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "tth", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, TTH, 0, 0, 1);
 
 	return self;
 }
@@ -311,9 +329,10 @@ static HklEngineList *hkl_engine_list_new_eulerian4C_horizontal(const HklFactory
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_e4c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_e4c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q_new());
+	hkl_engine_e4c_hkl_new(self);
+	hkl_engine_e4c_psi_new(self);
+	hkl_engine_q_new(self);
+	hkl_engine_e4c_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-e6c.c b/hkl/hkl-engine-e6c.c
index 59fc231..0977e3a 100644
--- a/hkl/hkl-engine-e6c.c
+++ b/hkl/hkl-engine-e6c.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -21,9 +21,18 @@
  */
 #include <gsl/gsl_sys.h>                // for gsl_isnan
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for hkl_mode_operations, etc
 #include "hkl-pseudoaxis-common-psi-private.h"  // for hkl_engine_psi_new, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"  // for hkl_engine_tth2_new, etc
+
+#define MU "mu"
+#define OMEGA "omega"
+#define CHI "chi"
+#define PHI "phi"
+#define GAMMA "gamma"
+#define DELTA "delta"
 
 /***********************/
 /* numerical functions */
@@ -67,14 +76,14 @@ static const HklFunction bissector_vertical_func = {
 	.size = 4,
 };
 
-/*********/
-/* modes */
-/*********/
+/************/
+/* mode hkl */
+/************/
 
 static HklMode *bissector_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "chi", "phi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&bissector_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -87,8 +96,8 @@ static HklMode *bissector_vertical(void)
 
 static HklMode *constant_omega_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"chi", "phi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -101,8 +110,8 @@ static HklMode *constant_omega_vertical(void)
 
 static HklMode *constant_chi_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "phi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, PHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -115,8 +124,8 @@ static HklMode *constant_chi_vertical(void)
 
 static HklMode *constant_phi_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "chi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, CHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -129,8 +138,8 @@ static HklMode *constant_phi_vertical(void)
 
 static HklMode *lifting_detector_phi(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"phi", "gamma", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {PHI, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -143,8 +152,8 @@ static HklMode *lifting_detector_phi(void)
 
 static HklMode *lifting_detector_omega(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "gamma", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -157,8 +166,8 @@ static HklMode *lifting_detector_omega(void)
 
 static HklMode *lifting_detector_mu(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "gamma", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -171,8 +180,8 @@ static HklMode *lifting_detector_mu(void)
 
 static HklMode *double_diffraction_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "chi", "phi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -186,8 +195,8 @@ static HklMode *double_diffraction_vertical(void)
 
 static HklMode *bissector_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "omega", "chi", "phi", "gamma"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, OMEGA, CHI, PHI, GAMMA};
 	static const HklFunction *functions[] = {&bissector_horizontal_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -200,8 +209,8 @@ static HklMode *bissector_horizontal(void)
 
 static HklMode *double_diffraction_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "chi", "phi", "gamma"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, CHI, PHI, GAMMA};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -215,8 +224,8 @@ static HklMode *double_diffraction_horizontal(void)
 
 static HklMode *psi_constant_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "chi", "phi", "delta"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklParameter parameters[] = { PSI_CONSTANT_PARAMETERS(1, 0, 0, 0) };
 	static const HklModeAutoInfo info = {
@@ -230,8 +239,8 @@ static HklMode *psi_constant_vertical(void)
 
 static HklMode *psi_constant_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "chi", "phi", "gamma"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, CHI, PHI, GAMMA};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -245,8 +254,8 @@ static HklMode *psi_constant_horizontal(void)
 
 static HklMode *constant_mu_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char* axes_w[] = {"chi", "phi", "gamma"};
+	static const char* axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char* axes_w[] = {CHI, PHI, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -257,16 +266,12 @@ static HklMode *constant_mu_horizontal(void)
 				 TRUE);
 }
 
-/***********************/
-/* E6C PseudoAxeEngine */
-/***********************/
-
-static HklEngine *hkl_engine_e6c_hkl_new(void)
+static HklEngine *hkl_engine_e6c_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector_vertical();
 	hkl_engine_add_mode(self, default_mode);
@@ -288,14 +293,14 @@ static HklEngine *hkl_engine_e6c_hkl_new(void)
 	return self;
 }
 
-/********/
-/* mode */
-/********/
+/************/
+/* mode psi */
+/************/
 
 static HklMode* psi_vertical()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
-	static const char *axes_w[] = {"omega", "chi", "phi", "delta"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
+	static const char *axes_w[] = {OMEGA, CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&psi_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -305,16 +310,12 @@ static HklMode* psi_vertical()
 	return hkl_mode_psi_new(&info);
 }
 
-/**********************/
-/* pseudo axis engine */
-/**********************/
-
-static HklEngine *hkl_engine_e6c_psi_new(void)
+static HklEngine *hkl_engine_e6c_psi_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_psi_new();
+	self = hkl_engine_psi_new(engines);
 
 	default_mode = psi_vertical();
 	hkl_engine_add_mode(self, default_mode);
@@ -323,6 +324,14 @@ static HklEngine *hkl_engine_e6c_psi_new(void)
 	return self;
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *e6c_incidence_axes[] = {MU, OMEGA, CHI, PHI};
+
+REGISTER_INCIDENCE_ENGINE(e6c);
+
 /*******/
 /* E6C */
 /*******/
@@ -331,17 +340,17 @@ static HklEngine *hkl_engine_e6c_psi_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 4 axes for the sample\n"					\
 	"\n"								\
-	"  + **mu** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **omega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **chi** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"  + **phi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 2 axes for the detector\n"					\
 	"\n"								\
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_eulerian6C_axes[] = {"mu", "omega", "chi", "phi", "gamma", "delta"};
+static const char* hkl_geometry_eulerian6C_axes[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
 
 static HklGeometry *hkl_geometry_new_eulerian6C(const HklFactory *factory)
 {
@@ -349,14 +358,14 @@ static HklGeometry *hkl_geometry_new_eulerian6C(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "chi", 1, 0, 0);
-	hkl_holder_add_rotation_axis(h, "phi", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, CHI, 1, 0, 0);
+	hkl_holder_add_rotation_axis(h, PHI, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
 
 	return self;
 }
@@ -365,10 +374,12 @@ static HklEngineList *hkl_engine_list_new_eulerian6C(const HklFactory *factory)
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_e6c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_e6c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_e6c_hkl_new(self);
+	hkl_engine_e6c_psi_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_e6c_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-k4c.c b/hkl/hkl-engine-k4c.c
index 82d2c3a..dca3440 100644
--- a/hkl/hkl-engine-k4c.c
+++ b/hkl/hkl-engine-k4c.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -25,6 +25,12 @@
 #include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for RUBh_minus_Q, etc
 #include "hkl-pseudoaxis-common-psi-private.h"  // for hkl_engine_psi_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
+
+#define KOMEGA "komega"
+#define KAPPA "kappa"
+#define KPHI "kphi"
+#define TTH "tth"
 
 static void hkl_geometry_list_multiply_k4c_real(HklGeometryList *self,
 						HklGeometryListItem *item)
@@ -105,7 +111,7 @@ static const HklFunction bissector_f2 = {
 
 static HklMode *bissector(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&bissector_f1, &bissector_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes, axes, functions),
@@ -166,7 +172,7 @@ static const HklFunction constant_omega_f2 = {
 
 static HklMode *constant_omega(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&constant_omega_f1, &constant_omega_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -226,7 +232,7 @@ static const HklFunction constant_chi_f2 = {
 
 static HklMode *constant_chi(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&constant_chi_f1, &constant_chi_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -288,7 +294,7 @@ static const HklFunction constant_phi_f2 = {
 
 static HklMode *constant_phi(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&constant_phi_f1, &constant_phi_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -302,7 +308,7 @@ static HklMode *constant_phi(void)
 
 static HklMode *double_diffraction(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -316,7 +322,7 @@ static HklMode *double_diffraction(void)
 
 static HklMode *psi_constant(void)
 {
-	static const char* axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char* axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -328,12 +334,12 @@ static HklMode *psi_constant(void)
 				 TRUE);
 }
 
-static HklEngine *hkl_engine_k4cv_hkl_new(void)
+static HklEngine *hkl_engine_k4cv_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector();
 	hkl_engine_add_mode(self, default_mode);
@@ -355,7 +361,7 @@ static HklEngine *hkl_engine_k4cv_hkl_new(void)
 /* psi */
 static HklMode *psi()
 {
-	static const char *axes[] = {"komega", "kappa", "kphi", "tth"};
+	static const char *axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 	static const HklFunction *functions[] = {&psi_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes, axes,
@@ -365,12 +371,12 @@ static HklMode *psi()
 	return hkl_mode_psi_new(&info);
 }
 
-static HklEngine *hkl_engine_k4cv_psi_new(void)
+static HklEngine *hkl_engine_k4cv_psi_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_psi_new();
+	self = hkl_engine_psi_new(engines);
 
 	default_mode = psi();
 	hkl_engine_add_mode(self, default_mode);
@@ -379,6 +385,14 @@ static HklEngine *hkl_engine_k4cv_psi_new(void)
 	return self;
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *kappa4C_vertical_incidence_axes[] = {KOMEGA, KAPPA, KPHI};
+
+REGISTER_INCIDENCE_ENGINE(kappa4C_vertical);
+
 /********/
 /* K4CV */
 /********/
@@ -390,15 +404,15 @@ static HklEngine *hkl_engine_k4cv_psi_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **komega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **kappa** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
-	"  + **kphi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" KOMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" KAPPA "** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
+	"  + **" KPHI "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 1 axis for the detector\n"					\
 	"\n"								\
-	"  + **tth** : rotation around the :math:`-\\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" TTH "** : rotation around the :math:`-\\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_kappa4C_vertical_axes[] = {"komega", "kappa", "kphi", "tth"};
+static const char* hkl_geometry_kappa4C_vertical_axes[] = {KOMEGA, KAPPA, KPHI, TTH};
 
 static HklGeometry *hkl_geometry_new_kappa4C_vertical(const HklFactory *factory)
 {
@@ -407,12 +421,12 @@ static HklGeometry *hkl_geometry_new_kappa4C_vertical(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "komega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "kappa", 0, -cos(alpha), -sin(alpha));
-	hkl_holder_add_rotation_axis(h, "kphi", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, KOMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, KAPPA, 0, -cos(alpha), -sin(alpha));
+	hkl_holder_add_rotation_axis(h, KPHI, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "tth", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, TTH, 0, -1, 0);
 
 	return self;
 }
@@ -422,10 +436,11 @@ static HklEngineList *hkl_engine_list_new_kappa4C_vertical(const HklFactory *fac
 	HklEngineList *self = hkl_engine_list_new();
 
 	self->geometries->multiply = hkl_geometry_list_multiply_k4c_real;
-	hkl_engine_list_add(self, hkl_engine_k4cv_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_eulerians_new());
-	hkl_engine_list_add(self, hkl_engine_k4cv_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q_new());
+	hkl_engine_k4cv_hkl_new(self);
+	hkl_engine_eulerians_new(self);
+	hkl_engine_k4cv_psi_new(self);
+	hkl_engine_q_new(self);
+	hkl_engine_kappa4C_vertical_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-k6c.c b/hkl/hkl-engine-k6c.c
index f99b095..a02fa40 100644
--- a/hkl/hkl-engine-k6c.c
+++ b/hkl/hkl-engine-k6c.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -22,9 +22,18 @@
 #include <gsl/gsl_sys.h>                // for gsl_isnan
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
 #include "hkl-pseudoaxis-common-eulerians-private.h"
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for RUBh_minus_Q, etc
 #include "hkl-pseudoaxis-common-psi-private.h"  // for hkl_engine_psi_new, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+
+#define MU "mu"
+#define KOMEGA "komega"
+#define KAPPA "kappa"
+#define KPHI "kphi"
+#define GAMMA "gamma"
+#define DELTA "delta"
 
 static void hkl_geometry_list_multiply_k6c_real(HklGeometryList *self,
 						HklGeometryListItem *item)
@@ -351,7 +360,7 @@ static int _constant_incidence_func(const gsl_vector *x, void *params, gsl_vecto
 	hkl_vector_rotated_quaternion(&n, &darray_item(engine->geometry->holders, 0)->q);
 
 	hkl_source_compute_ki(&engine->geometry->source, &ki);
-	incidence = M_PI_2 - hkl_vector_angle(&n, &ki);
+	incidence = _incidence(&n, &ki);
 
 	hkl_vector_project_on_plan(&n, &ki);
 	azimuth = hkl_vector_angle(&n, &Y);
@@ -367,14 +376,18 @@ static const HklFunction constant_incidence_func = {
 	.size = 5,
 };
 
-/********/
-/* mode */
-/********/
+/*******/
+/* K6C */
+/*******/
+
+/************/
+/* hkl mode */
+/************/
 
 static HklMode *bissector_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&bissector_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -387,8 +400,8 @@ static HklMode *bissector_vertical(void)
 
 static HklMode *constant_omega_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&constant_omega_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -402,8 +415,8 @@ static HklMode *constant_omega_vertical(void)
 
 static HklMode *constant_chi_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&constant_chi_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -417,8 +430,8 @@ static HklMode *constant_chi_vertical(void)
 
 static HklMode *constant_phi_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&constant_phi_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -432,8 +445,8 @@ static HklMode *constant_phi_vertical(void)
 
 static HklMode *lifting_detector_kphi(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"kphi", "gamma", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KPHI, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -446,8 +459,8 @@ static HklMode *lifting_detector_kphi(void)
 
 static HklMode *lifting_detector_komega(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "gamma", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -460,8 +473,8 @@ static HklMode *lifting_detector_komega(void)
 
 static HklMode *lifting_detector_mu(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "gamma", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -474,8 +487,8 @@ static HklMode *lifting_detector_mu(void)
 
 static HklMode *double_diffraction_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -489,8 +502,8 @@ static HklMode *double_diffraction_vertical(void)
 
 static HklMode *bissector_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&bissector_h_f1, &bissector_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -503,8 +516,8 @@ static HklMode *bissector_horizontal(void)
 
 static HklMode *constant_phi_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&constant_phi_h_f1, &constant_phi_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -518,8 +531,8 @@ static HklMode *constant_phi_horizontal(void)
 
 static HklMode *constant_kphi_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, GAMMA};
 	static const HklFunction *functions[] = {&constant_kphi_h_f1, &constant_kphi_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -532,8 +545,8 @@ static HklMode *constant_kphi_horizontal(void)
 
 static HklMode *double_diffraction_horizontal(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&double_diffraction_h};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -547,8 +560,8 @@ static HklMode *double_diffraction_horizontal(void)
 
 static HklMode *psi_constant_vertical(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -562,8 +575,8 @@ static HklMode *psi_constant_vertical(void)
 
 static HklMode *constant_incidence(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&constant_incidence_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -575,16 +588,12 @@ static HklMode *constant_incidence(void)
 					   TRUE);
 }
 
-/**********************/
-/* pseudo axis engine */
-/**********************/
-
-static HklEngine *hkl_engine_k6c_hkl_new(void)
+static HklEngine *hkl_engine_k6c_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector_vertical();
 	hkl_engine_add_mode(self, default_mode);
@@ -607,16 +616,111 @@ static HklEngine *hkl_engine_k6c_hkl_new(void)
 	return self;
 }
 
+/************/
+/* psi mode */
+/************/
+
+static HklMode *psi_vertical(void)
+{
+	static const char *axes_r[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+	static const char *axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA};
+	static const HklFunction *functions[] = {&psi_func};
+	static const HklModeAutoInfo info = {
+		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
+					       functions, psi_parameters),
+	};
+
+	return hkl_mode_psi_new(&info);
+}
+
+static HklEngine *hkl_engine_k6c_psi_new(HklEngineList *engines)
+{
+	HklEngine *self;
+	HklMode *default_mode;
+
+	self = hkl_engine_psi_new(engines);
+
+	default_mode = psi_vertical();
+	hkl_engine_add_mode(self, default_mode);
+	hkl_engine_mode_set(self, default_mode);
+
+	return self;
+}
+
+/******************/
+/* incidence mode */
+/******************/
+
+static const char *k6c_incidence_axes[] = {MU, KOMEGA, KAPPA, KPHI};
+
+REGISTER_INCIDENCE_ENGINE(k6c);
+
+#define HKL_GEOMETRY_KAPPA6C_DESCRIPTION				\
+	"For this geometry there is a special parameters called :math:`\\alpha` which is the\n" \
+	"angle between the kappa rotation axis and the  :math:`\\vec{y}` direction.\n" \
+	"\n"								\
+	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"+ 4 axes for the sample\n"					\
+	"\n"								\
+	"  + **mu** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **komega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **kappa** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
+	"  + **kphi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"\n"								\
+	"+ 2 axes for the detector\n"					\
+	"\n"								\
+	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+
+static const char* hkl_geometry_kappa6C_axes[] = {MU, KOMEGA, KAPPA, KPHI, GAMMA, DELTA};
+
+static HklGeometry *hkl_geometry_new_kappa6C(const HklFactory *factory)
+{
+	HklGeometry *self = hkl_geometry_new(factory);
+	double alpha = 50 * HKL_DEGTORAD;
+	HklHolder *h;
+
+	h = hkl_geometry_add_holder(self);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, KOMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, KAPPA, 0, -cos(alpha), -sin(alpha));
+	hkl_holder_add_rotation_axis(h, KPHI, 0, -1, 0);
+
+	h = hkl_geometry_add_holder(self);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
+
+	return self;
+}
+
+static HklEngineList *hkl_engine_list_new_kappa6C(const HklFactory *factory)
+{
+	HklEngineList *self = hkl_engine_list_new();
+
+	self->geometries->multiply = hkl_geometry_list_multiply_k6c_real;
+	hkl_engine_k6c_hkl_new(self);
+	hkl_engine_eulerians_new(self);
+	hkl_engine_k6c_psi_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_k6c_incidence_new(self);
+	hkl_engine_tth2_new(self);
+
+	return self;
+}
+
+REGISTER_DIFFRACTOMETER(kappa6C, "K6C", HKL_GEOMETRY_KAPPA6C_DESCRIPTION);
+
 /***********************/
 /* SOLEIL sirius kappa */
 /***********************/
 
-/* mode */
+/* hkl mode */
 
 static HklMode *bissector_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&bissector_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("bissector_vertical", axes_r, axes_w, functions),
@@ -629,8 +733,8 @@ static HklMode *bissector_vertical_soleil_sirius_kappa(void)
 
 static HklMode *constant_omega_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&constant_omega_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("constant_omega_vertical", axes_r, axes_w,
@@ -644,8 +748,8 @@ static HklMode *constant_omega_vertical_soleil_sirius_kappa(void)
 
 static HklMode *constant_chi_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&constant_chi_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("constant_chi_vertical", axes_r, axes_w,
@@ -659,8 +763,8 @@ static HklMode *constant_chi_vertical_soleil_sirius_kappa(void)
 
 static HklMode *constant_phi_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&constant_phi_v};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("constant_phi_vertical", axes_r, axes_w,
@@ -674,8 +778,8 @@ static HklMode *constant_phi_vertical_soleil_sirius_kappa(void)
 
 static HklMode *lifting_detector_kphi_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"kphi", "delta", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KPHI, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("lifting_detector_kphi", axes_r, axes_w, functions),
@@ -688,8 +792,8 @@ static HklMode *lifting_detector_kphi_soleil_sirius_kappa(void)
 
 static HklMode *lifting_detector_komega_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "delta", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("lifting_detector_komega", axes_r, axes_w, functions),
@@ -702,8 +806,8 @@ static HklMode *lifting_detector_komega_soleil_sirius_kappa(void)
 
 static HklMode *lifting_detector_mu_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"mu", "delta", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {MU, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("lifting_detector_mu", axes_r, axes_w, functions),
@@ -716,8 +820,8 @@ static HklMode *lifting_detector_mu_soleil_sirius_kappa(void)
 
 static HklMode *double_diffraction_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&double_diffraction_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("double_diffraction_vertical", axes_r, axes_w,
@@ -731,8 +835,8 @@ static HklMode *double_diffraction_vertical_soleil_sirius_kappa(void)
 
 static HklMode *bissector_horizontal_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&bissector_h_f1, &bissector_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("bissector_horizontal", axes_r, axes_w, functions),
@@ -745,8 +849,8 @@ static HklMode *bissector_horizontal_soleil_sirius_kappa(void)
 
 static HklMode *constant_phi_horizontal_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&constant_phi_h_f1, &constant_phi_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("constant_phi_horizontal", axes_r, axes_w,
@@ -760,8 +864,8 @@ static HklMode *constant_phi_horizontal_soleil_sirius_kappa(void)
 
 static HklMode *constant_kphi_horizontal_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, DELTA};
 	static const HklFunction *functions[] = {&constant_kphi_h_f1, &constant_kphi_h_f2};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("constant_kphi_horizontal", axes_r, axes_w, functions),
@@ -774,8 +878,8 @@ static HklMode *constant_kphi_horizontal_soleil_sirius_kappa(void)
 
 static HklMode *double_diffraction_horizontal_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"mu", "komega", "kappa", "kphi", "delta"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {MU, KOMEGA, KAPPA, KPHI, DELTA};
 	static const HklFunction *functions[] = {&double_diffraction_h};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("double_diffraction_horizontal", axes_r, axes_w,
@@ -789,8 +893,8 @@ static HklMode *double_diffraction_horizontal_soleil_sirius_kappa(void)
 
 static HklMode *psi_constant_vertical_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&psi_constant_vertical_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("psi_constant_vertical", axes_r, axes_w,
@@ -804,8 +908,8 @@ static HklMode *psi_constant_vertical_soleil_sirius_kappa(void)
 
 static HklMode *constant_incidence_soleil_sirius_kappa(void)
 {
-	static const char* axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char* axes_w[] = {"komega", "kappa", "kphi", "delta", "gamma"};
+	static const char* axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char* axes_w[] = {KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&constant_incidence_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("constant_incidence", axes_r, axes_w,
@@ -817,12 +921,12 @@ static HklMode *constant_incidence_soleil_sirius_kappa(void)
 					   TRUE);
 }
 
-static HklEngine *hkl_engine_soleil_sirius_kappa_hkl_new(void)
+static HklEngine *hkl_engine_soleil_sirius_kappa_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector_vertical_soleil_sirius_kappa();
 	hkl_engine_add_mode(self, default_mode);
@@ -845,41 +949,12 @@ static HklEngine *hkl_engine_soleil_sirius_kappa_hkl_new(void)
 	return self;
 }
 
-static HklMode *psi_vertical()
-{
-	static const char *axes_r[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-	static const char *axes_w[] = {"komega", "kappa", "kphi", "delta"};
-	static const HklFunction *functions[] = {&psi_func};
-	static const HklModeAutoInfo info = {
-		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
-					       functions, psi_parameters),
-	};
-
-	return hkl_mode_psi_new(&info);
-}
-
-static HklEngine *hkl_engine_k6c_psi_new(void)
-{
-	HklEngine *self;
-	HklMode *default_mode;
-
-	self = hkl_engine_psi_new();
-
-	default_mode = psi_vertical();
-	hkl_engine_add_mode(self, default_mode);
-	hkl_engine_mode_set(self, default_mode);
-
-	return self;
-}
-
-/***********************/
-/* SOLEIL SIRIUS KAPPA */
-/***********************/
+/* psi mode */
 
 static HklMode *psi_vertical_soleil_sirius_kappa()
 {
-	static const char *axes_r[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
-	static const char *axes_w[] = {"komega", "kappa", "kphi", "gamma"};
+	static const char *axes_r[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
+	static const char *axes_w[] = {KOMEGA, KAPPA, KPHI, GAMMA};
 	static const HklFunction *functions[] = {&psi_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS(__func__, axes_r, axes_w,
@@ -889,12 +964,12 @@ static HklMode *psi_vertical_soleil_sirius_kappa()
 	return hkl_mode_psi_new(&info);
 }
 
-static HklEngine *hkl_engine_soleil_sirius_kappa_psi_new(void)
+static HklEngine *hkl_engine_soleil_sirius_kappa_psi_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_psi_new();
+	self = hkl_engine_psi_new(engines);
 
 	default_mode = psi_vertical_soleil_sirius_kappa();
 	hkl_engine_add_mode(self, default_mode);
@@ -903,83 +978,23 @@ static HklEngine *hkl_engine_soleil_sirius_kappa_psi_new(void)
 	return self;
 }
 
-/*******/
-/* K6C */
-/*******/
-
-#define HKL_GEOMETRY_KAPPA6C_DESCRIPTION				\
-	"For this geometry there is a special parameters called :math:`\\alpha` which is the\n" \
-	"angle between the kappa rotation axis and the  :math:`\\vec{y}` direction.\n" \
-	"\n"								\
-	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"+ 4 axes for the sample\n"					\
-	"\n"								\
-	"  + **mu** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **komega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **kappa** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
-	"  + **kphi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"\n"								\
-	"+ 2 axes for the detector\n"					\
-	"\n"								\
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
-
-static const char* hkl_geometry_kappa6C_axes[] = {"mu", "komega", "kappa", "kphi", "gamma", "delta"};
-
-static HklGeometry *hkl_geometry_new_kappa6C(const HklFactory *factory)
-{
-	HklGeometry *self = hkl_geometry_new(factory);
-	double alpha = 50 * HKL_DEGTORAD;
-	HklHolder *h;
-
-	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "komega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "kappa", 0, -cos(alpha), -sin(alpha));
-	hkl_holder_add_rotation_axis(h, "kphi", 0, -1, 0);
-
-	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
-
-	return self;
-}
-
-static HklEngineList *hkl_engine_list_new_kappa6C(const HklFactory *factory)
-{
-	HklEngineList *self = hkl_engine_list_new();
-
-	self->geometries->multiply = hkl_geometry_list_multiply_k6c_real;
-	hkl_engine_list_add(self, hkl_engine_k6c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_eulerians_new());
-	hkl_engine_list_add(self, hkl_engine_k6c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
-
-	return self;
-}
-
-REGISTER_DIFFRACTOMETER(kappa6C, "K6C", HKL_GEOMETRY_KAPPA6C_DESCRIPTION);
-
-/***********************/
 /* SOLEIL SIRIUS KAPPA */
-/***********************/
 
 #define HKL_GEOMETRY_TYPE_SOLEIL_SIRIUS_KAPPA_DESCRIPTION		\
 	"+ xrays source fix along the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 4 axes for the sample\n"					\
 	"\n"								\
-	"  + **mu** : rotating around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
-	"  + **komega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **kappa** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
-	"  + **kphi** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotating around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
+	"  + **" KOMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" KAPPA "** : rotating around the :math:`\\vec{x}` direction (0, :math:`-\\cos\\alpha`, :math:`-\\sin\\alpha`)\n" \
+	"  + **" KPHI "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 2 axes for the detector\n"					\
 	"\n"								\
-	"  + **delta** : rotation around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
-	"  + **gamma** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_soleil_sirius_kappa_axes[] = {"mu", "komega", "kappa", "kphi", "delta", "gamma"};
+static const char* hkl_geometry_soleil_sirius_kappa_axes[] = {MU, KOMEGA, KAPPA, KPHI, DELTA, GAMMA};
 
 static HklGeometry *hkl_geometry_new_soleil_sirius_kappa(const HklFactory *factory)
 {
@@ -988,14 +1003,14 @@ static HklGeometry *hkl_geometry_new_soleil_sirius_kappa(const HklFactory *facto
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, -1);
-	hkl_holder_add_rotation_axis(h, "komega", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "kappa", 0, -cos(alpha), -sin(alpha));
-	hkl_holder_add_rotation_axis(h, "kphi", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, -1);
+	hkl_holder_add_rotation_axis(h, KOMEGA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, KAPPA, 0, -cos(alpha), -sin(alpha));
+	hkl_holder_add_rotation_axis(h, KPHI, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "delta", 0, 0, -1);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, 0, -1);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, -1, 0);
 
 	return self;
 }
@@ -1005,11 +1020,13 @@ static HklEngineList *hkl_engine_list_new_soleil_sirius_kappa(const HklFactory *
 	HklEngineList *self = hkl_engine_list_new();
 
 	self->geometries->multiply = hkl_geometry_list_multiply_k6c_real;
-	hkl_engine_list_add(self, hkl_engine_soleil_sirius_kappa_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_eulerians_new());
-	hkl_engine_list_add(self, hkl_engine_soleil_sirius_kappa_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_soleil_sirius_kappa_hkl_new(self);
+	hkl_engine_eulerians_new(self);
+	hkl_engine_soleil_sirius_kappa_psi_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_k6c_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-petra3-p09-eh2.c b/hkl/hkl-engine-petra3-p09-eh2.c
index 9afdf30..265c5ac 100644
--- a/hkl/hkl-engine-petra3-p09-eh2.c
+++ b/hkl/hkl-engine-petra3-p09-eh2.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -23,14 +23,21 @@
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"
 
+#define MU "mu"
+#define OMEGA "omega"
+#define CHI "chi"
+#define PHI "phi"
+#define DELTA "delta"
+#define GAMMA "gamma"
+
 /********/
 /* mode */
 /********/
 
 static HklMode *zaxis_alpha_fixed()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"omega", "delta", "gamma"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {OMEGA, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("zaxis + alpha-fixed", axes_r, axes_w, functions),
@@ -43,8 +50,8 @@ static HklMode *zaxis_alpha_fixed()
 
 static HklMode *zaxis_beta_fixed()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"mu", "delta", "gamma"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {MU, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("zaxis + beta-fixed", axes_r, axes_w, functions),
@@ -78,8 +85,8 @@ static const HklFunction reflectivity = {
 
 static HklMode *zaxis_alpha_eq_beta()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"mu", "omega", "delta", "gamma"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {MU, OMEGA, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&reflectivity};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("zaxis + alpha=beta", axes_r, axes_w, functions),
@@ -112,8 +119,8 @@ static const HklFunction bissector_horizontal = {
 
 static HklMode *fourc_bissector_horizontal()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"omega", "chi", "phi", "delta"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {OMEGA, CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&bissector_horizontal};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("4-circles bissecting horizontal", axes_r, axes_w, functions),
@@ -126,8 +133,8 @@ static HklMode *fourc_bissector_horizontal()
 
 static HklMode *fourc_constant_omega_horizontal()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"chi", "phi", "delta"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {CHI, PHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("4-circles constant omega horizontal", axes_r, axes_w, functions),
@@ -140,8 +147,8 @@ static HklMode *fourc_constant_omega_horizontal()
 
 static HklMode *fourc_constant_chi_horizontal()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"omega", "phi", "delta"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {OMEGA, PHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("4-circles constant chi horizontal", axes_r, axes_w, functions),
@@ -154,8 +161,8 @@ static HklMode *fourc_constant_chi_horizontal()
 
 static HklMode *fourc_constant_phi_horizontal()
 {
-	static const char *axes_r[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
-	static const char *axes_w[] = {"omega", "chi", "delta"};
+	static const char *axes_r[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
+	static const char *axes_w[] = {OMEGA, CHI, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("4-circles constant phi horizontal", axes_r, axes_w, functions),
@@ -170,12 +177,12 @@ static HklMode *fourc_constant_phi_horizontal()
 /* pseudo axis engine */
 /**********************/
 
-static HklEngine *hkl_engine_petra3_p09_eh2_hkl_new(void)
+static HklEngine *hkl_engine_petra3_p09_eh2_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = zaxis_alpha_fixed();
 	hkl_engine_add_mode(self, default_mode);
@@ -199,18 +206,18 @@ static HklEngine *hkl_engine_petra3_p09_eh2_hkl_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 4 axes for the sample\n"					\
 	"\n"								\
-	"  + **mu** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **omega** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **chi** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"  + **phi** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" MU "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" OMEGA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
 	"\n"								\
 	"+ 3 axis for the detector\n"					\
 	"\n"								\
-	"  + **mu** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **delta** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **gamma** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" MU "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" DELTA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_petra3_p09_eh2_axes[] = {"mu", "omega", "chi", "phi", "delta", "gamma"};
+static const char* hkl_geometry_petra3_p09_eh2_axes[] = {MU, OMEGA, CHI, PHI, DELTA, GAMMA};
 
 static HklGeometry *hkl_geometry_new_petra3_p09_eh2(const HklFactory *factory)
 {
@@ -218,15 +225,15 @@ static HklGeometry *hkl_geometry_new_petra3_p09_eh2(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "omega", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "chi", 1, 0, 0);
-	hkl_holder_add_rotation_axis(h, "phi", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, MU, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, CHI, 1, 0, 0);
+	hkl_holder_add_rotation_axis(h, PHI, 0, 0, 1);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "delta", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, -1, 0);
 
 	return self;
 }
@@ -235,7 +242,7 @@ static HklEngineList *hkl_engine_list_new_petra3_p09_eh2(const HklFactory *facto
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_petra3_p09_eh2_hkl_new());
+	hkl_engine_petra3_p09_eh2_hkl_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-soleil-sirius-turret.c b/hkl/hkl-engine-soleil-sirius-turret.c
index a5b9dbb..aea7bac 100644
--- a/hkl/hkl-engine-soleil-sirius-turret.c
+++ b/hkl/hkl-engine-soleil-sirius-turret.c
@@ -13,24 +13,32 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
  * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
  */
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for hkl_engine_hkl_new, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
+
+#define THETAH "thetah"
+#define ALPHAY "alphay"
+#define ALPHAX "alphax"
+#define DELTA "delta"
+#define GAMMA "gamma"
 
-/**************************/
-/* TURRET PseudoAxeEngine */
-/**************************/
+/************/
+/* mode hkl */
+/************/
 
 static HklMode* lifting_detector_thetah()
 {
-	static const char *axes_r[] = {"thetah", "alphay", "alphax", "delta", "gamma"};
-	static const char* axes_w[] = {"thetah", "delta", "gamma"};
+	static const char *axes_r[] = {THETAH, ALPHAY, ALPHAX, DELTA, GAMMA};
+	static const char* axes_w[] = {THETAH, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -41,12 +49,12 @@ static HklMode* lifting_detector_thetah()
 				 TRUE);
 }
 
-static HklEngine *hkl_engine_soleil_sirius_turret_hkl_new(void)
+static HklEngine *hkl_engine_soleil_sirius_turret_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = lifting_detector_thetah();
 	hkl_engine_add_mode(self, default_mode);
@@ -55,6 +63,14 @@ static HklEngine *hkl_engine_soleil_sirius_turret_hkl_new(void)
 	return self;
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *soleil_sirius_turret_incidence_axes[] = {THETAH, ALPHAY, ALPHAX};
+
+REGISTER_INCIDENCE_ENGINE(soleil_sirius_turret);
+
 /************************/
 /* SOLEIL SIRIUS TURRET */
 /************************/
@@ -63,16 +79,16 @@ static HklEngine *hkl_engine_soleil_sirius_turret_hkl_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **thetah** : rotation around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
-	"  + **alphay** : rotation around the :math:`\\vec{y}` direction (0, 1, 0)\n" \
-	"  + **alphax** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" THETAH "** : rotation around the :math:`-\\vec{z}` direction (0, 0, -1)\n" \
+	"  + **" ALPHAY "** : rotation around the :math:`\\vec{y}` direction (0, 1, 0)\n" \
+	"  + **" ALPHAX "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"\n"								\
 	"+ 2 axis for the detector\n"					\
 	"\n"								\
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, 0, -1)\n" \
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n"
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, 0, -1)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_soleil_sirius_turret_axes[] = {"thetah", "alphay", "alphax", "delta", "gamma"};
+static const char* hkl_geometry_soleil_sirius_turret_axes[] = {THETAH, ALPHAY, ALPHAX, DELTA, GAMMA};
 
 static HklGeometry *hkl_geometry_new_soleil_sirius_turret(const HklFactory *factory)
 {
@@ -80,13 +96,13 @@ static HklGeometry *hkl_geometry_new_soleil_sirius_turret(const HklFactory *fact
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "thetah", 0, 0, -1);
-	hkl_holder_add_rotation_axis(h, "alphay", 0, 1, 0);
-	hkl_holder_add_rotation_axis(h, "alphax", 1, 0, 0);
+	hkl_holder_add_rotation_axis(h, THETAH, 0, 0, -1);
+	hkl_holder_add_rotation_axis(h, ALPHAY, 0, 1, 0);
+	hkl_holder_add_rotation_axis(h, ALPHAX, 1, 0, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "delta", 0, 0, -1);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, 0, -1);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, -1, 0);
 
 	return self;
 }
@@ -95,9 +111,11 @@ static HklEngineList *hkl_engine_list_new_soleil_sirius_turret(const HklFactory
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_soleil_sirius_turret_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_soleil_sirius_turret_hkl_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_soleil_sirius_turret_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-soleil-sixs-med.c b/hkl/hkl-engine-soleil-sixs-med.c
index 77fc5e4..3071cbc 100644
--- a/hkl/hkl-engine-soleil-sixs-med.c
+++ b/hkl/hkl-engine-soleil-sixs-med.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -22,8 +22,18 @@
 #include <gsl/gsl_multiroots.h>
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
 #include "hkl-axis-private.h"           // for HklAxis
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for hkl_engine_hkl_new, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
+
+#define PITCH "pitch"
+#define BETA "beta"
+#define MU "mu"
+#define OMEGA "omega"
+#define GAMMA "gamma"
+#define DELTA "delta"
+#define ETA_A "eta_a"
 
 /* #define DEBUG */
 
@@ -51,8 +61,8 @@ static const HklFunction reflectivity_func = {
 
 static HklMode* mu_fixed_2_2()
 {
-	static const char* axes_r[] = {"beta", "mu", "omega", "gamma", "delta"};
-	static const char* axes_w[] = {"omega", "gamma", "delta"};
+	static const char* axes_r[] = {BETA, MU, OMEGA, GAMMA, DELTA};
+	static const char* axes_w[] = {OMEGA, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("mu_fixed", axes_r, axes_w, functions),
@@ -65,8 +75,8 @@ static HklMode* mu_fixed_2_2()
 
 static HklMode* reflectivity_2_2()
 {
-	static const char* axes_r[] = {"beta", "mu", "omega", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "omega", "gamma", "delta"};
+	static const char* axes_r[] = {BETA, MU, OMEGA, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, OMEGA, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&reflectivity_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("reflectivity", axes_r, axes_w, functions),
@@ -77,12 +87,12 @@ static HklMode* reflectivity_2_2()
 				 TRUE);
 }
 
-static HklEngine *hkl_engine_soleil_sixs_med_2_2_hkl_new(void)
+static HklEngine *hkl_engine_soleil_sixs_med_2_2_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = mu_fixed_2_2();
 	hkl_engine_add_mode(self, default_mode);
@@ -93,14 +103,20 @@ static HklEngine *hkl_engine_soleil_sixs_med_2_2_hkl_new(void)
 	return self;
 }
 
+/* mode incidence */
+
+static const char *soleil_sixs_med_2_2_incidence_axes[] = {BETA, MU, OMEGA};
+
+REGISTER_INCIDENCE_ENGINE(soleil_sixs_med_2_2);
+
 /*********************/
 /* MED 1+2 HklEngine */
 /*********************/
 
 static HklMode* pitch_fixed()
 {
-	static const char *axes_r[] = {"pitch", "mu", "gamma", "delta"};
-	static const char* axes_w[] = {"mu", "gamma", "delta"};
+	static const char *axes_r[] = {PITCH, MU, GAMMA, DELTA};
+	static const char* axes_w[] = {MU, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes_r, axes_w, functions),
@@ -111,12 +127,12 @@ static HklMode* pitch_fixed()
 				 TRUE);
 }
 
-static HklEngine *hkl_engine_soleil_sixs_med_1_2_hkl_new(void)
+static HklEngine *hkl_engine_soleil_sixs_med_1_2_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = pitch_fixed();
 	hkl_engine_add_mode(self, default_mode);
@@ -125,6 +141,12 @@ static HklEngine *hkl_engine_soleil_sixs_med_1_2_hkl_new(void)
 	return self;
 }
 
+/* mode incidence */
+
+static const char *soleil_sixs_med_1_2_incidence_axes[] = {PITCH, MU};
+
+REGISTER_INCIDENCE_ENGINE(soleil_sixs_med_1_2);
+
 /*********************/
 /* MED 2+3 HklEngine */
 /*********************/
@@ -269,8 +291,8 @@ static void hkl_geometry_list_multiply_soleil_sixs_med_2_3(HklGeometryList *self
 
 static HklMode* mu_fixed_2_3()
 {
-	static const char *axes_r[] = {"beta", "mu", "omega", "gamma", "delta", "eta_a"};
-	static const char* axes_w[] = {"omega", "gamma", "delta"};
+	static const char *axes_r[] = {BETA, MU, OMEGA, GAMMA, DELTA, ETA_A};
+	static const char* axes_w[] = {OMEGA, GAMMA, DELTA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("mu_fixed", axes_r, axes_w, functions),
@@ -281,12 +303,12 @@ static HklMode* mu_fixed_2_3()
 				 TRUE);
 }
 
-static HklEngine *hkl_engine_soleil_sixs_med_2_3_hkl_new(void)
+static HklEngine *hkl_engine_soleil_sixs_med_2_3_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = mu_fixed_2_3();
 	hkl_engine_add_mode(self, default_mode);
@@ -303,17 +325,17 @@ static HklEngine *hkl_engine_soleil_sixs_med_2_3_hkl_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **beta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **mu** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **omega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" BETA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 3 axis for the detector\n"					\
 	"\n"								\
-	"  + **beta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" BETA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_soleil_sixs_med_2_2_axes[] = {"beta", "mu", "omega", "gamma", "delta"};
+static const char* hkl_geometry_soleil_sixs_med_2_2_axes[] = {BETA, MU, OMEGA, GAMMA, DELTA};
 
 static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_2(const HklFactory *factory)
 {
@@ -321,14 +343,14 @@ static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_2(const HklFactory *facto
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "beta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, BETA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "beta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, BETA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
 
 	return self;
 }
@@ -337,9 +359,11 @@ static HklEngineList *hkl_engine_list_new_soleil_sixs_med_2_2(const HklFactory *
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_soleil_sixs_med_2_2_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_soleil_sixs_med_2_2_hkl_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_soleil_sixs_med_2_2_incidence_new(self);
 
 	return self;
 }
@@ -354,16 +378,16 @@ REGISTER_DIFFRACTOMETER(soleil_sixs_med_2_2,"SOLEIL SIXS MED2+2", HKL_GEOMETRY_T
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 2 axes for the sample\n"					\
 	"\n"								\
-	"  + **pitch** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **mu** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" PITCH "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
 	"\n"								\
 	"+ 3 axis for the detector\n"					\
 	"\n"								\
-	"  + **pitch** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" PITCH "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
-static const char* hkl_geometry_soleil_sixs_med_1_2_axes[] = {"pitch", "mu", "gamma", "delta"};
+static const char* hkl_geometry_soleil_sixs_med_1_2_axes[] = {PITCH, MU, GAMMA, DELTA};
 
 static HklGeometry *hkl_geometry_new_soleil_sixs_med_1_2(const HklFactory *factory)
 {
@@ -371,13 +395,13 @@ static HklGeometry *hkl_geometry_new_soleil_sixs_med_1_2(const HklFactory *facto
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "pitch", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, PITCH, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "pitch", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, PITCH, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
 
 	return self;
 }
@@ -386,9 +410,11 @@ static HklEngineList *hkl_engine_list_new_soleil_sixs_med_1_2(const HklFactory *
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_soleil_sixs_med_1_2_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_soleil_sixs_med_1_2_hkl_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_soleil_sixs_med_1_2_incidence_new(self);
 
 	return self;
 }
@@ -404,18 +430,18 @@ REGISTER_DIFFRACTOMETER(soleil_sixs_med_1_2, "SOLEIL SIXS MED1+2", HKL_GEOMETRY_
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 3 axes for the sample\n"					\
 	"\n"								\
-	"  + **beta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **mu** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **omega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" BETA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 4 axis for the detector\n"					\
 	"\n"								\
-	"  + **beta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **eta_a** : rotation around the :math:`-\\vec{x}` direction (-1, 0, 0)\n"
+	"  + **" BETA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" ETA_A "** : rotation around the :math:`-\\vec{x}` direction (-1, 0, 0)\n"
 
-static const char* hkl_geometry_soleil_sixs_med_2_3_axes[] = {"beta", "mu", "omega", "gamma", "delta", "eta_a"};
+static const char* hkl_geometry_soleil_sixs_med_2_3_axes[] = {BETA, MU, OMEGA, GAMMA, DELTA, ETA_A};
 
 static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_3(const HklFactory *factory)
 {
@@ -423,15 +449,15 @@ static HklGeometry *hkl_geometry_new_soleil_sixs_med_2_3(const HklFactory *facto
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "beta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, BETA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "beta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "eta_a", -1, 0, 0);
+	hkl_holder_add_rotation_axis(h, BETA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, ETA_A, -1, 0, 0);
 
 	return self;
 }
@@ -441,9 +467,11 @@ static HklEngineList *hkl_engine_list_new_soleil_sixs_med_2_3(const HklFactory *
 	HklEngineList *self = hkl_engine_list_new();
 
 	self->geometries->multiply = hkl_geometry_list_multiply_soleil_sixs_med_2_3;
-	hkl_engine_list_add(self, hkl_engine_soleil_sixs_med_2_3_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_soleil_sixs_med_2_3_hkl_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_soleil_sixs_med_2_2_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-template.c b/hkl/hkl-engine-template.c
index 06d44d4..0b36272 100644
--- a/hkl/hkl-engine-template.c
+++ b/hkl/hkl-engine-template.c
@@ -14,7 +14,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  * Copyright (C) 2014      XXX copyright owner XXX
@@ -24,9 +24,11 @@
  */
 #include <gsl/gsl_sys.h>                // for gsl_isnan
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for hkl_mode_operations, etc
 #include "hkl-pseudoaxis-common-psi-private.h"  // for hkl_engine_psi_new, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
 
 /**************/
 /* Axes names */
@@ -47,15 +49,15 @@
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 4 axes for the sample\n"					\
 	"\n"								\
-	"  + **"MU"** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **"OMEGA"** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **"CHI"** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
-	"  + **"PHI"** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotating around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" CHI "** : rotating around the :math:`\\vec{x}` direction (1, 0, 0)\n" \
+	"  + **" PHI "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 2 axes for the detector\n"					\
 	"\n"								\
-	"  + **"GAMMA"** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **"DELTA"** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
 
 static const char* hkl_geometry_eulerian6C_axes[] = {MU, OMEGA, CHI, PHI, GAMMA, DELTA};
 
@@ -169,16 +171,24 @@ static HklMode* psi_vertical()
 	return hkl_mode_psi_new(&info);
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *template_incidence_axes[] = {MU, OMEGA, CHI, PHI};
+
+REGISTER_INCIDENCE_ENGINE(template);
+
 /***********/
 /* Engines */
 /***********/
 
-static HklEngine *hkl_engine_e6c_hkl_new(void)
+static HklEngine *hkl_engine_e6c_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = bissector_vertical();
 	hkl_engine_add_mode(self, default_mode);
@@ -189,12 +199,12 @@ static HklEngine *hkl_engine_e6c_hkl_new(void)
 	return self;
 }
 
-static HklEngine *hkl_engine_e6c_psi_new(void)
+static HklEngine *hkl_engine_e6c_psi_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_psi_new();
+	self = hkl_engine_psi_new(engines);
 
 	default_mode = psi_vertical();
 	hkl_engine_add_mode(self, default_mode);
@@ -211,10 +221,12 @@ static HklEngineList *hkl_engine_list_new_eulerian6C(const HklFactory *factory)
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_e6c_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_e6c_psi_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_e6c_hkl_new(self);
+	hkl_engine_e6c_psi_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_template_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-engine-zaxis.c b/hkl/hkl-engine-zaxis.c
index 513451c..c40b361 100644
--- a/hkl/hkl-engine-zaxis.c
+++ b/hkl/hkl-engine-zaxis.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -21,15 +21,22 @@
  */
 #include <gsl/gsl_sys.h>                // for gsl_isnan
 #include "hkl-factory-private.h"        // for autodata_factories_, etc
-#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
 #include "hkl-pseudoaxis-common-hkl-private.h"  // for RUBh_minus_Q, etc
+#include "hkl-pseudoaxis-common-q-private.h"  // for hkl_engine_q2_new, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for hkl_engine_tth2_new, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"  // for hkl_engine_tth2_new, etc
+
+#define MU "mu"
+#define OMEGA "omega"
+#define DELTA "delta"
+#define GAMMA "gamma"
 
 /* #define DEBUG */
 
 static HklMode* _zaxis()
 {
-	static const char *axes_r[] = {"mu", "omega", "delta", "gamma"};
-	static const char *axes_w[] = {"omega", "delta", "gamma"};
+	static const char *axes_r[] = {MU, OMEGA, DELTA, GAMMA};
+	static const char *axes_w[] = {OMEGA, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&RUBh_minus_Q_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("zaxis", axes_r, axes_w, functions),
@@ -62,7 +69,7 @@ static const HklFunction reflectivity_func = {
 
 static HklMode* reflectivity()
 {
-	static const char* axes[] = {"mu", "omega", "delta", "gamma"};
+	static const char* axes[] = {MU, OMEGA, DELTA, GAMMA};
 	static const HklFunction *functions[] = {&reflectivity_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO(__func__, axes, axes, functions),
@@ -77,12 +84,12 @@ static HklMode* reflectivity()
 /* pseudo axis engine */
 /**********************/
 
-static HklEngine *hkl_engine_zaxis_hkl_new(void)
+static HklEngine *hkl_engine_zaxis_hkl_new(HklEngineList *engines)
 {
 	HklEngine *self;
 	HklMode *default_mode;
 
-	self = hkl_engine_hkl_new();
+	self = hkl_engine_hkl_new(engines);
 
 	default_mode = _zaxis();
 	hkl_engine_add_mode(self, default_mode);
@@ -93,6 +100,14 @@ static HklEngine *hkl_engine_zaxis_hkl_new(void)
 	return self;
 }
 
+/******************/
+/* mode incidence */
+/******************/
+
+static const char *zaxis_incidence_axes[] = {MU, OMEGA};
+
+REGISTER_INCIDENCE_ENGINE(zaxis);
+
 /*********/
 /* ZAXIS */
 /*********/
@@ -103,16 +118,16 @@ static HklEngine *hkl_engine_zaxis_hkl_new(void)
 	"+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
 	"+ 2 axes for the sample\n"					\
 	"\n"								\
-	"  + **mu** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **omega** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" MU "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
 	"\n"								\
 	"+ 3 axis for the detector\n"					\
 	"\n"								\
-	"  + **mu** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
-	"  + **delta** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
-	"  + **gamma** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n"
+	"  + **" MU "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n" \
+	"  + **" DELTA "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
+	"  + **" GAMMA "** : rotation around the :math:`\\vec{z}` direction (0, 0, 1)\n"
 
-static const char* hkl_geometry_zaxis_axes[] = {"mu", "omega", "delta", "gamma"};
+static const char* hkl_geometry_zaxis_axes[] = {MU, OMEGA, DELTA, GAMMA};
 
 static HklGeometry *hkl_geometry_new_zaxis(const HklFactory *factory)
 {
@@ -120,13 +135,13 @@ static HklGeometry *hkl_geometry_new_zaxis(const HklFactory *factory)
 	HklHolder *h;
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "omega", 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
 
 	h = hkl_geometry_add_holder(self);
-	hkl_holder_add_rotation_axis(h, "mu", 0, 0, 1);
-	hkl_holder_add_rotation_axis(h, "delta", 0, -1, 0);
-	hkl_holder_add_rotation_axis(h, "gamma", 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, MU, 0, 0, 1);
+	hkl_holder_add_rotation_axis(h, DELTA, 0, -1, 0);
+	hkl_holder_add_rotation_axis(h, GAMMA, 0, 0, 1);
 
 	return self;
 }
@@ -135,9 +150,11 @@ static HklEngineList *hkl_engine_list_new_zaxis(const HklFactory *factory)
 {
 	HklEngineList *self = hkl_engine_list_new();
 
-	hkl_engine_list_add(self, hkl_engine_zaxis_hkl_new());
-	hkl_engine_list_add(self, hkl_engine_q2_new());
-	hkl_engine_list_add(self, hkl_engine_qper_qpar_new());
+	hkl_engine_zaxis_hkl_new(self);
+	hkl_engine_q2_new(self);
+	hkl_engine_qper_qpar_new(self);
+	hkl_engine_tth2_new(self);
+	hkl_engine_zaxis_incidence_new(self);
 
 	return self;
 }
diff --git a/hkl/hkl-factory-private.h b/hkl/hkl-factory-private.h
index d6be5b7..29a70ab 100644
--- a/hkl/hkl-factory-private.h
+++ b/hkl/hkl-factory-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-factory.c b/hkl/hkl-factory.c
index 542f698..6181c5c 100644
--- a/hkl/hkl-factory.c
+++ b/hkl/hkl-factory.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-geometry-private.h b/hkl/hkl-geometry-private.h
index 126a99e..d78da0b 100644
--- a/hkl/hkl-geometry-private.h
+++ b/hkl/hkl-geometry-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-geometry.c b/hkl/hkl-geometry.c
index fa39300..3ae17ae 100644
--- a/hkl/hkl-geometry.c
+++ b/hkl/hkl-geometry.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-interval-private.h b/hkl/hkl-interval-private.h
index b848874..b49fd3a 100644
--- a/hkl/hkl-interval-private.h
+++ b/hkl/hkl-interval-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-interval.c b/hkl/hkl-interval.c
index a4fc71c..5435262 100644
--- a/hkl/hkl-interval.c
+++ b/hkl/hkl-interval.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-lattice-private.h b/hkl/hkl-lattice-private.h
index 9ec6fc1..7c2e6a7 100644
--- a/hkl/hkl-lattice-private.h
+++ b/hkl/hkl-lattice-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -36,6 +36,7 @@ struct _HklLattice
 	HklParameter *alpha;
 	HklParameter *beta;
 	HklParameter *gamma;
+	HklParameter *volume;
 };
 
 #define HKL_LATTICE_ERROR hkl_lattice_error_quark ()
diff --git a/hkl/hkl-lattice.c b/hkl/hkl-lattice.c
index 59360f4..3815782 100644
--- a/hkl/hkl-lattice.c
+++ b/hkl/hkl-lattice.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -44,6 +44,7 @@ static double convert_to_default(const HklParameter *p, double value, HklUnitEnu
 
 static int check_lattice_param(double a, double b, double c,
 			       double alpha, double beta, double gamma,
+			       double *volume,
 			       GError **error)
 {
 	hkl_error (error == NULL || *error == NULL);
@@ -57,8 +58,10 @@ static int check_lattice_param(double a, double b, double c,
 			    HKL_LATTICE_CHECK_LATTICE,
 			    "these lattice parameters are not valid, check alpha, beta and gamma");
 		return FALSE;
-	}else
+	}else{
+		*volume = a * b * c * sqrt(D);
 		return TRUE;
+	}
 }
 
 /* public */
@@ -82,10 +85,11 @@ HklLattice *hkl_lattice_new(double a, double b, double c,
 			    GError **error)
 {
 	HklLattice *self = NULL;
+	double volume;
 
 	hkl_error (error == NULL || *error == NULL);
 
-	if(!check_lattice_param(a, b, c, alpha, beta, gamma, error))
+	if(!check_lattice_param(a, b, c, alpha, beta, gamma, &volume, error))
 	{
 		g_assert (error == NULL || *error != NULL);
 		return FALSE;
@@ -127,6 +131,13 @@ HklLattice *hkl_lattice_new(double a, double b, double c,
 					TRUE, TRUE,
 					&hkl_unit_angle_rad,
 					&hkl_unit_angle_deg);
+	self->volume = hkl_parameter_new("volume",
+					 "The volume of the lattice",
+					 0, volume, a*b*c,
+					 FALSE, FALSE,
+					 &hkl_unit_length_nm,
+					 &hkl_unit_length_nm);
+
 	return self;
 }
 
@@ -150,6 +161,7 @@ HklLattice *hkl_lattice_new_copy(const HklLattice *self)
 	copy->alpha = hkl_parameter_new_copy(self->alpha);
 	copy->beta = hkl_parameter_new_copy(self->beta);
 	copy->gamma = hkl_parameter_new_copy(self->gamma);
+	copy->volume = hkl_parameter_new_copy(self->volume);
 
 	return copy;
 }
@@ -182,11 +194,27 @@ void hkl_lattice_free(HklLattice *self)
 	hkl_parameter_free(self->alpha);
 	hkl_parameter_free(self->beta);
 	hkl_parameter_free(self->gamma);
+	hkl_parameter_free(self->volume);
 	free(self);
 }
 
+#define HKL_LATTICE_X_SET(_p, _parameter, _error) do{			\
+		hkl_error ((_error) == NULL || *(_error) == NULL);	\
+		double a, b, c, alpha, beta, gamma;			\
+		/* check if the combinaison of parameters is ok */	\
+		hkl_lattice_get(self, &a, &b, &c, &alpha, &beta, &gamma, HKL_UNIT_DEFAULT); \
+		_p = hkl_parameter_value_get((_parameter), HKL_UNIT_DEFAULT); \
+									\
+		if(!hkl_lattice_set(self, a, b, c, alpha, beta, gamma, HKL_UNIT_DEFAULT, (_error))){ \
+			g_assert ((_error) == NULL || *(_error) != NULL); \
+			return FALSE;					\
+		}							\
+		g_assert ((_error) == NULL || *(_error) == NULL);	\
+		return hkl_parameter_init_copy(self->_p, (_parameter), (_error)); \
+	}while(0)
+
 /**
- * hkl_lattice_a_get: (skip)
+ * hkl_lattice_a_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_a_get(const HklLattice *self)
@@ -195,7 +223,7 @@ const HklParameter *hkl_lattice_a_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_a_set: (skip)
+ * hkl_lattice_a_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -205,13 +233,11 @@ const HklParameter *hkl_lattice_a_get(const HklLattice *self)
 int hkl_lattice_a_set(HklLattice *self, const HklParameter *parameter,
 		      GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
-
-	return hkl_parameter_init_copy(self->a, parameter, error);
+	HKL_LATTICE_X_SET(a, parameter, error);
 }
 
 /**
- * hkl_lattice_b_get: (skip)
+ * hkl_lattice_b_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_b_get(const HklLattice *self)
@@ -220,7 +246,7 @@ const HklParameter *hkl_lattice_b_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_b_set: (skip)
+ * hkl_lattice_b_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -230,13 +256,11 @@ const HklParameter *hkl_lattice_b_get(const HklLattice *self)
 int hkl_lattice_b_set(HklLattice *self, const HklParameter *parameter,
 		      GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
-
-	return hkl_parameter_init_copy(self->b, parameter, error);
+	HKL_LATTICE_X_SET(b, parameter, error);
 }
 
 /**
- * hkl_lattice_c_get: (skip)
+ * hkl_lattice_c_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_c_get(const HklLattice *self)
@@ -245,7 +269,7 @@ const HklParameter *hkl_lattice_c_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_c_set: (skip)
+ * hkl_lattice_c_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -255,13 +279,11 @@ const HklParameter *hkl_lattice_c_get(const HklLattice *self)
 int hkl_lattice_c_set(HklLattice *self, const HklParameter *parameter,
 		      GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
-
-	return hkl_parameter_init_copy(self->c, parameter, error);
+	HKL_LATTICE_X_SET(c, parameter, error);
 }
 
 /**
- * hkl_lattice_alpha_get: (skip)
+ * hkl_lattice_alpha_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_alpha_get(const HklLattice *self)
@@ -270,7 +292,7 @@ const HklParameter *hkl_lattice_alpha_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_alpha_set: (skip)
+ * hkl_lattice_alpha_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -280,13 +302,11 @@ const HklParameter *hkl_lattice_alpha_get(const HklLattice *self)
 int hkl_lattice_alpha_set(HklLattice *self, const HklParameter *parameter,
 			  GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
-
-	return hkl_parameter_init_copy(self->alpha, parameter, error);
+	HKL_LATTICE_X_SET(alpha, parameter, error);
 }
 
 /**
- * hkl_lattice_beta_get: (skip)
+ * hkl_lattice_beta_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_beta_get(const HklLattice *self)
@@ -295,7 +315,7 @@ const HklParameter *hkl_lattice_beta_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_beta_set: (skip)
+ * hkl_lattice_beta_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -305,13 +325,11 @@ const HklParameter *hkl_lattice_beta_get(const HklLattice *self)
 int hkl_lattice_beta_set(HklLattice *self, const HklParameter *parameter,
 			 GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
-
-	return hkl_parameter_init_copy(self->beta, parameter, error);
+	HKL_LATTICE_X_SET(beta, parameter, error);
 }
 
 /**
- * hkl_lattice_gamma_get: (skip)
+ * hkl_lattice_gamma_get:
  * @self: the this ptr
  **/
 const HklParameter *hkl_lattice_gamma_get(const HklLattice *self)
@@ -320,7 +338,7 @@ const HklParameter *hkl_lattice_gamma_get(const HklLattice *self)
 }
 
 /**
- * hkl_lattice_gamma_set: (skip)
+ * hkl_lattice_gamma_set:
  * @self: the this ptr
  * @parameter: the parameter to set
  * @error: return location for a GError, or NULL
@@ -330,9 +348,16 @@ const HklParameter *hkl_lattice_gamma_get(const HklLattice *self)
 int hkl_lattice_gamma_set(HklLattice *self, const HklParameter *parameter,
 			   GError **error)
 {
-	hkl_error (error == NULL || *error == NULL);
+	HKL_LATTICE_X_SET(gamma, parameter, error);
+}
 
-	return hkl_parameter_init_copy(self->gamma, parameter, error);
+/**
+ * hkl_lattice_volume_get:
+ * @self: the this ptr
+ **/
+const HklParameter *hkl_lattice_volume_get(const HklLattice *self)
+{
+	return self->volume;
 }
 
 /**
@@ -351,6 +376,7 @@ void hkl_lattice_lattice_set(HklLattice *self, const HklLattice *lattice)
 	hkl_parameter_init_copy(self->alpha, lattice->alpha, NULL);
 	hkl_parameter_init_copy(self->beta, lattice->beta, NULL);
 	hkl_parameter_init_copy(self->gamma, lattice->gamma, NULL);
+	hkl_parameter_init_copy(self->volume, lattice->volume, NULL);
 }
 
 /**
@@ -375,6 +401,7 @@ int hkl_lattice_set(HklLattice *self,
 	hkl_error (error == NULL || *error == NULL);
 
 	double _a, _b, _c, _alpha, _beta, _gamma;
+	double _volume;
 
 	_a = convert_to_default(self->a, a, unit_type);
 	_b = convert_to_default(self->b, b, unit_type);
@@ -384,7 +411,7 @@ int hkl_lattice_set(HklLattice *self,
 	_gamma = convert_to_default(self->gamma, gamma, unit_type);
 
 	/* need to do the conversion before the check */
-	if(!check_lattice_param(_a, _b, _c, _alpha, _beta, _gamma, error)){
+	if(!check_lattice_param(_a, _b, _c, _alpha, _beta, _gamma, &_volume, error)){
 		g_assert (error == NULL || *error != NULL);
 		return FALSE;
 	}
@@ -397,6 +424,8 @@ int hkl_lattice_set(HklLattice *self,
 	hkl_parameter_value_set(self->beta, _beta, HKL_UNIT_DEFAULT, NULL);
 	hkl_parameter_value_set(self->gamma, _gamma, HKL_UNIT_DEFAULT, NULL);
 
+	hkl_parameter_value_set(self->volume, _volume, HKL_UNIT_DEFAULT, NULL);
+
 	return TRUE;
 }
 
diff --git a/hkl/hkl-macros-private.h b/hkl/hkl-macros-private.h
index 76d3f7b..7c6eb70 100644
--- a/hkl/hkl-macros-private.h
+++ b/hkl/hkl-macros-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-macros.c b/hkl/hkl-macros.c
index c7ec0ea..e2dfba3 100644
--- a/hkl/hkl-macros.c
+++ b/hkl/hkl-macros.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-matrix-private.h b/hkl/hkl-matrix-private.h
index 5be2654..870beec 100644
--- a/hkl/hkl-matrix-private.h
+++ b/hkl/hkl-matrix-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-matrix.c b/hkl/hkl-matrix.c
index a5cec25..cd59700 100644
--- a/hkl/hkl-matrix.c
+++ b/hkl/hkl-matrix.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-parameter-private.h b/hkl/hkl-parameter-private.h
index 53ed38e..48a6f64 100644
--- a/hkl/hkl-parameter-private.h
+++ b/hkl/hkl-parameter-private.h
@@ -14,7 +14,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-parameter.c b/hkl/hkl-parameter.c
index 94cd2ac..f3ed98f 100644
--- a/hkl/hkl-parameter.c
+++ b/hkl/hkl-parameter.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-pseudoaxis-auto-private.h b/hkl/hkl-pseudoaxis-auto-private.h
index a733399..16739bf 100644
--- a/hkl/hkl-pseudoaxis-auto-private.h
+++ b/hkl/hkl-pseudoaxis-auto-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-pseudoaxis-auto.c b/hkl/hkl-pseudoaxis-auto.c
index 10a985b..d928e44 100644
--- a/hkl/hkl-pseudoaxis-auto.c
+++ b/hkl/hkl-pseudoaxis-auto.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-pseudoaxis-common-eulerians-private.h b/hkl/hkl-pseudoaxis-common-eulerians-private.h
index 55934d9..d669637 100644
--- a/hkl/hkl-pseudoaxis-common-eulerians-private.h
+++ b/hkl/hkl-pseudoaxis-common-eulerians-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -23,21 +23,10 @@
 #define __HKL_PSEUDOAXIS_COMMON_EULERIANS_H__
 
 #include "hkl.h"                        // for HklParameter, etc
-#include "hkl-pseudoaxis-auto-private.h"// for HklEngine
 
 G_BEGIN_DECLS
 
-typedef struct _HklEngineEulerians HklEngineEulerians;
-
-struct _HklEngineEulerians
-{
-	HklParameter *omega;
-	HklParameter *chi;
-	HklParameter *phi;
-	HklEngine engine;
-};
-
-extern HklEngine *hkl_engine_eulerians_new(void);
+extern HklEngine *hkl_engine_eulerians_new(HklEngineList *engines);
 
 extern void kappa_2_kappap(double komega, double kappa, double kphi, double alpha,
 			   double *komegap, double *kappap, double *kphip);
diff --git a/hkl/hkl-pseudoaxis-common-eulerians.c b/hkl/hkl-pseudoaxis-common-eulerians.c
index ddce0f6..54daf6c 100644
--- a/hkl/hkl-pseudoaxis-common-eulerians.c
+++ b/hkl/hkl-pseudoaxis-common-eulerians.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -34,6 +34,23 @@
 #include "hkl/ccan/container_of/container_of.h"  // for container_of
 #include "hkl/ccan/darray/darray.h"     // for darray_item
 
+typedef struct _HklModeEulerians HklModeEulerians;
+typedef struct _HklEngineEulerians HklEngineEulerians;
+
+struct _HklModeEulerians
+{
+	HklMode parent;
+	HklParameter *solutions;
+};
+
+struct _HklEngineEulerians
+{
+	HklEngine engine;
+	HklParameter *omega;
+	HklParameter *chi;
+	HklParameter *phi;
+};
+
 #define HKL_MODE_EULERIANS_ERROR hkl_mode_eulerians_error_quark ()
 
 static GQuark hkl_mode_eulerians_error_quark (void)
@@ -97,13 +114,9 @@ static int eulerian_to_kappa(const double omega, const double chi, const double
 void kappa_2_kappap(double komega, double kappa, double kphi, double alpha,
 		    double *komegap, double *kappap, double *kphip)
 {
-	double p;
-	double omega;
-	double phi;
-
-	p = atan(tan(kappa/2.) * cos(alpha));
-	omega = komega + p - M_PI_2;
-	phi = kphi + p + M_PI_2;
+	double p = atan(tan(kappa/2.) * cos(alpha));
+	double omega = komega + p - M_PI_2;
+	double phi = kphi + p + M_PI_2;
 
 	*komegap = gsl_sf_angle_restrict_symm(2*omega - komega);
 	*kappap = -kappa;
@@ -115,14 +128,15 @@ void kappa_2_kappap(double komega, double kappa, double kphi, double alpha,
 /* HklMode */
 /***********/
 
-static int hkl_mode_get_eulerians_real(HklMode *self,
+static int hkl_mode_get_eulerians_real(HklMode *base,
 				       HklEngine *engine,
 				       HklGeometry *geometry,
 				       HklDetector *detector,
 				       HklSample *sample,
 				       GError **error)
 {
-	HklEngineEulerians *eulerians;
+	HklModeEulerians *self = container_of(base, HklModeEulerians, parent);
+	HklEngineEulerians *eulerians = container_of(engine, HklEngineEulerians, engine);;
 	const double angles[] = {
 		hkl_parameter_value_get(
 			hkl_geometry_get_axis_by_name(geometry, "komega"),
@@ -134,41 +148,34 @@ static int hkl_mode_get_eulerians_real(HklMode *self,
 			hkl_geometry_get_axis_by_name(geometry, "kphi"),
 			HKL_UNIT_DEFAULT),
 	};
-	double values[3];
-	double solution;
-	HklParameter *parameter;
 
 	hkl_geometry_update(geometry);
 
-	solution = darray_item(self->parameters, 0)->_value;
-
-	eulerians = container_of(engine, HklEngineEulerians, engine);
 	kappa_to_eulerian(angles,
 			  &eulerians->omega->_value,
 			  &eulerians->chi->_value,
 			  &eulerians->phi->_value,
-			  50 * HKL_DEGTORAD, solution);
+			  50 * HKL_DEGTORAD, self->solutions->_value);
 
 	return TRUE;
 }
 
-static int hkl_mode_set_eulerians_real(HklMode *self,
+static int hkl_mode_set_eulerians_real(HklMode *base,
 				       HklEngine *engine,
 				       HklGeometry *geometry,
 				       HklDetector *detector,
 				       HklSample *sample,
 				       GError **error)
 {
-	double solution;
-	HklEngineEulerians *engine_eulerians;
+	HklModeEulerians *self = container_of(base, HklModeEulerians, parent);
+	HklEngineEulerians *eulerians = container_of(engine, HklEngineEulerians, engine);;
 	double angles[3];
 
-	solution = darray_item(self->parameters, 0)->_value;
-	engine_eulerians = container_of(engine, HklEngineEulerians, engine);
-	if(!eulerian_to_kappa(engine_eulerians->omega->_value,
-			      engine_eulerians->chi->_value,
-			      engine_eulerians->phi->_value,
-			      angles, 50 * HKL_DEGTORAD, solution)){
+	if(!eulerian_to_kappa(eulerians->omega->_value,
+			      eulerians->chi->_value,
+			      eulerians->phi->_value,
+			      angles, 50 * HKL_DEGTORAD,
+			      self->solutions->_value)){
 		g_set_error(error,
 			    HKL_MODE_EULERIANS_ERROR,
 			    HKL_MODE_EULERIANS_ERROR_SET,
@@ -180,10 +187,8 @@ static int hkl_mode_set_eulerians_real(HklMode *self,
 	return TRUE;
 }
 
-
 static HklMode *mode_eulerians()
 {
-	HklMode *mode;
 	static const char *axes[] = {"komega", "kappa", "kphi"};
 	static const HklParameter parameters[] = {
 		{ HKL_PARAMETER_DEFAULTS,.name = "solutions", ._value = 1,
@@ -200,7 +205,16 @@ static HklMode *mode_eulerians()
 		.set = hkl_mode_set_eulerians_real,
 	};
  
-	return hkl_mode_new(&info, &operations, TRUE);
+	HklModeEulerians *self = HKL_MALLOC(HklModeEulerians);
+
+	/* the base constructor; */
+	hkl_mode_init(&self->parent,
+		      &info,
+		      &operations, TRUE);
+
+	self->solutions = register_mode_parameter(&self->parent, 0);
+
+	return &self->parent;
 };
 
 /*************/
@@ -216,29 +230,27 @@ static void hkl_engine_eulerians_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_eulerians_new(void)
+HklEngine *hkl_engine_eulerians_new(HklEngineList *engines)
 {
 	HklEngineEulerians *self;
 	HklMode *mode;
-	static const HklPseudoAxis omega = {
-		.parameter = { HKL_PARAMETER_DEFAULTS_ANGLE, .name = "omega",
-			       .description = "omega equivalent for a four circle eulerian geometry",
-		}
+	static const HklParameter omega = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "omega",
+		.description = "omega equivalent for a four circle eulerian geometry",
 	};
-	static const HklPseudoAxis chi = {
-		.parameter = { HKL_PARAMETER_DEFAULTS_ANGLE, .name = "chi",
-			       .description = "chi equivalent for a four circle eulerian geometry",
-		}
+	static const HklParameter chi = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "chi",
+		.description = "chi equivalent for a four circle eulerian geometry",
 	};
-	static const HklPseudoAxis phi = {
-		.parameter = { HKL_PARAMETER_DEFAULTS_ANGLE, .name = "phi",
-			       .description = "phi equivalent for a four circle eulerian geometry",
-		}
+	static const HklParameter phi = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "phi",
+		.description = "phi equivalent for a four circle eulerian geometry",
 	};
-	static const HklPseudoAxis *pseudo_axes[] = {&omega, &chi, &phi};
+	static const HklParameter *pseudo_axes[] = {&omega, &chi, &phi};
 	static HklEngineInfo info = {
-		.name = "eulerians",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("eulerians",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES),
 	};
 	static HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -246,12 +258,12 @@ HklEngine *hkl_engine_eulerians_new(void)
 	};
 
 	self = HKL_MALLOC(HklEngineEulerians);
-	hkl_engine_init(&self->engine, &info, &operations);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
 
 	/* add the pseudo axes with the new API */
-	self->omega = register_pseudo_axis(&self->engine, &omega.parameter);
-	self->chi = register_pseudo_axis(&self->engine, &chi.parameter);
-	self->phi = register_pseudo_axis(&self->engine, &phi.parameter);
+	self->omega = register_pseudo_axis(&self->engine, engines, &omega);
+	self->chi = register_pseudo_axis(&self->engine, engines, &chi);
+	self->phi = register_pseudo_axis(&self->engine, engines, &phi);
 
 	/* eulerians [default] */
 	mode = mode_eulerians();
diff --git a/hkl/hkl-pseudoaxis-common-hkl-private.h b/hkl/hkl-pseudoaxis-common-hkl-private.h
index 4d5bbd6..d07110f 100644
--- a/hkl/hkl-pseudoaxis-common-hkl-private.h
+++ b/hkl/hkl-pseudoaxis-common-hkl-private.h
@@ -13,17 +13,21 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
  * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
  *          Maria-Teresa Nunez-Pardo-de-Verra <tnunez at mail.desy.de>
  */
+#ifndef __HKL_PSEUDOAXIS_COMMON_HKL_PRIVATE__
+#define __HKL_PSEUDOAXIS_COMMON_HKL_PRIVATE__
+
 #include <gsl/gsl_vector_double.h>      // for gsl_vector
 #include "hkl-pseudoaxis-auto-private.h"
 #include "hkl-pseudoaxis-private.h"     // for HklModeOperations, etc
 #include "hkl.h"                        // for HklEngine, HklDetector, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
 
 typedef struct _HklEngineHkl HklEngineHkl;
 struct _HklEngineHkl {
@@ -62,7 +66,7 @@ extern int hkl_mode_initialized_set_psi_constant_vertical_real(HklMode *base,
 							       int initialized,
 							       GError **error);
 
-extern HklEngine *hkl_engine_hkl_new(void);
+extern HklEngine *hkl_engine_hkl_new(HklEngineList *engines);
 
 #define HKL_MODE_OPERATIONS_HKL_DEFAULTS	\
 	HKL_MODE_OPERATIONS_AUTO_DEFAULTS,	\
@@ -160,21 +164,7 @@ static const HklParameter double_diffraction_parameters[] = {
 static const HklParameter psi_constant_parameters[] = { PSI_CONSTANT_PARAMETERS(1, 1, 1, 0) };
 
 static const HklParameter constant_incidence_parameters[] = {
-	{
-		HKL_PARAMETER_DEFAULTS, .name = "x", ._value = 1,
-		.description = "the x coordinate of the surface $\\vec{n}$",
-		.range = { .min=-1, .max=1 },
-	},
-	{
-		HKL_PARAMETER_DEFAULTS, .name = "y", ._value = 1,
-		.description = "the y coordinate of the surface $\\vec{n}$",
-		.range = { .min=-1, .max=1 },
-	},
-	{
-		HKL_PARAMETER_DEFAULTS, .name = "z", ._value = 1,
-		.description = "the z coordinate of the surface $\\vec{n}$",
-		.range = { .min=-1, .max=1 },
-	},
+	SURFACE_PARAMETERS(1, 1, 1),
 	{
 		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "incidence",
 		.description = "expected incidence of the incoming beam $\\vec{k_i}$ on the surface."
@@ -184,3 +174,5 @@ static const HklParameter constant_incidence_parameters[] = {
 		.description = "expected azimuth",
 	},
 };
+
+#endif
diff --git a/hkl/hkl-pseudoaxis-common-hkl.c b/hkl/hkl-pseudoaxis-common-hkl.c
index 0557035..9682b81 100644
--- a/hkl/hkl-pseudoaxis-common-hkl.c
+++ b/hkl/hkl-pseudoaxis-common-hkl.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -756,31 +756,29 @@ static void hkl_engine_hkl_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_hkl_new(void)
+HklEngine *hkl_engine_hkl_new(HklEngineList *engines)
 {
 	HklEngineHkl *self;
-	static const HklPseudoAxis h = {
-		.parameter = { HKL_PARAMETER_DEFAULTS, .name = "h",
-			       .description = "h coordinate of the diffracting plan",
-			       .range = { .min=-1, .max=1 },
-		},
+	static const HklParameter h = {
+		HKL_PARAMETER_DEFAULTS, .name = "h",
+		.description = "h coordinate of the diffracting plan",
+		.range = { .min=-1, .max=1 },
 	};
-	static const HklPseudoAxis k = {
-		.parameter = { HKL_PARAMETER_DEFAULTS, .name = "k",
-			       .description = "k coordinate of the diffracting plan",
-			       .range = { .min=-1, .max=1 },
-		},
+	static const HklParameter k = {
+		HKL_PARAMETER_DEFAULTS, .name = "k",
+		.description = "k coordinate of the diffracting plan",
+		.range = { .min=-1, .max=1 },
 	};
-	static const HklPseudoAxis l = {
-		.parameter = { HKL_PARAMETER_DEFAULTS, .name = "l",
-			       .description = "l coordinate of the diffracting plan",
-			       .range={ .min=-1, .max=1 },
-		},
+	static const HklParameter l = {
+		HKL_PARAMETER_DEFAULTS, .name = "l",
+		.description = "l coordinate of the diffracting plan",
+		.range={ .min=-1, .max=1 },
 	};
-	static const HklPseudoAxis *pseudo_axes[] = {&h, &k, &l};
+	static const HklParameter *pseudo_axes[] = {&h, &k, &l};
 	static HklEngineInfo info = {
-		.name = "hkl",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("hkl",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY | HKL_ENGINE_DEPENDENCIES_SAMPLE),
 	};
 	static HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -789,11 +787,11 @@ HklEngine *hkl_engine_hkl_new(void)
 
 	self = HKL_MALLOC(HklEngineHkl);
 
-	hkl_engine_init(&self->engine, &info, &operations);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
 
-	self->h = register_pseudo_axis(&self->engine, &h.parameter);
-	self->k = register_pseudo_axis(&self->engine, &k.parameter);
-	self->l = register_pseudo_axis(&self->engine, &l.parameter);
+	self->h = register_pseudo_axis(&self->engine, engines, &h);
+	self->k = register_pseudo_axis(&self->engine, engines, &k);
+	self->l = register_pseudo_axis(&self->engine, engines, &l);
 
 	return &self->engine;
 }
diff --git a/hkl/hkl-pseudoaxis-common-psi-private.h b/hkl/hkl-pseudoaxis-common-psi-private.h
index 48c9712..33d19bf 100644
--- a/hkl/hkl-pseudoaxis-common-psi-private.h
+++ b/hkl/hkl-pseudoaxis-common-psi-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -49,7 +49,7 @@ struct _HklEnginePsi
 extern HklMode *hkl_mode_psi_new(
 	const HklModeAutoInfo *info);
 
-extern HklEngine *hkl_engine_psi_new(void);
+extern HklEngine *hkl_engine_psi_new(HklEngineList *engines);
 
 extern int _psi_func(const gsl_vector *x, void *params, gsl_vector *f);
 
diff --git a/hkl/hkl-pseudoaxis-common-psi.c b/hkl/hkl-pseudoaxis-common-psi.c
index 99febce..0944dc0 100644
--- a/hkl/hkl-pseudoaxis-common-psi.c
+++ b/hkl/hkl-pseudoaxis-common-psi.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -283,18 +283,18 @@ static void hkl_engine_psi_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_psi_new(void)
+HklEngine *hkl_engine_psi_new(HklEngineList *engines)
 {
 	HklEnginePsi *self;
-	static const HklPseudoAxis psi = {
-		.parameter = { HKL_PARAMETER_DEFAULTS_ANGLE, .name = "psi",
-			       .description = "angle between the reference vector and the diffraction plan",
-		},
+	static const HklParameter psi = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "psi",
+		.description = "angle between the reference vector and the diffraction plan",
 	};
-	static const HklPseudoAxis *pseudo_axes[] = {&psi};
+	static const HklParameter *pseudo_axes[] = {&psi};
 	static const HklEngineInfo info = {
-		.name = "psi",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("psi",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY | HKL_ENGINE_DEPENDENCIES_SAMPLE),
 	};
 	static const HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -303,9 +303,9 @@ HklEngine *hkl_engine_psi_new(void)
 
 	self = HKL_MALLOC(HklEnginePsi);
 
-	hkl_engine_init(&self->engine, &info, &operations);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
 
-	self->psi = register_pseudo_axis(&self->engine, &psi.parameter);
+	self->psi = register_pseudo_axis(&self->engine, engines, &psi);
 
 	return &self->engine;
 }
diff --git a/hkl/hkl-pseudoaxis-common-q-private.h b/hkl/hkl-pseudoaxis-common-q-private.h
index 97fa679..fb846b9 100644
--- a/hkl/hkl-pseudoaxis-common-q-private.h
+++ b/hkl/hkl-pseudoaxis-common-q-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -26,15 +26,11 @@
 
 G_BEGIN_DECLS
 
-typedef struct _HklEngineQ HklEngineQ;
-typedef struct _HklEngineQ2 HklEngineQ2;
-typedef struct _HklEngineQperQpar HklEngineQperQpar;
-
 extern double qmax(double wavelength);
 
-extern HklEngine *hkl_engine_q_new(void);
-extern HklEngine *hkl_engine_q2_new(void);
-extern HklEngine *hkl_engine_qper_qpar_new(void);
+extern HklEngine *hkl_engine_q_new(HklEngineList *engines);
+extern HklEngine *hkl_engine_q2_new(HklEngineList *engines);
+extern HklEngine *hkl_engine_qper_qpar_new(HklEngineList *engines);
 
 G_END_DECLS
 
diff --git a/hkl/hkl-pseudoaxis-common-q.c b/hkl/hkl-pseudoaxis-common-q.c
index 93b4e2c..82e02f9 100644
--- a/hkl/hkl-pseudoaxis-common-q.c
+++ b/hkl/hkl-pseudoaxis-common-q.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -32,6 +32,7 @@
 #include "hkl-parameter-private.h"      // for _HklParameter, etc
 #include "hkl-pseudoaxis-auto-private.h"  // for HklFunction, etc
 #include "hkl-pseudoaxis-common-q-private.h"  // for HklEngineQ2, etc
+#include "hkl-pseudoaxis-common-readonly-private.h"
 #include "hkl-pseudoaxis-private.h"     // for _HklEngine, etc
 #include "hkl-source-private.h"         // for hkl_source_compute_ki, etc
 #include "hkl-vector-private.h"         // for HklVector, hkl_vector_angle, etc
@@ -40,6 +41,12 @@
 #include "hkl/ccan/container_of/container_of.h"  // for container_of
 #include "hkl/ccan/darray/darray.h"     // for darray_item
 
+#define GAMMA "gamma"
+#define DELTA "delta"
+
+typedef struct _HklEngineQ HklEngineQ;
+typedef struct _HklEngineQ2 HklEngineQ2;
+typedef struct _HklEngineQperQpar HklEngineQperQpar;
 
 double qmax(double wavelength)
 {
@@ -111,11 +118,10 @@ static int get_q_real(HklMode *self,
 
 /* not declared in the constructor as it is used also in the q2 pseudo
  * axis engine */
-static const HklPseudoAxis q = {
-	.parameter = { HKL_PARAMETER_DEFAULTS, .name="q",
-		       .description = "the norm of $\\vec{q}$",
-		       .range = { .max=1 },
-	},
+static const HklParameter q = {
+	HKL_PARAMETER_DEFAULTS, .name="q",
+	.description = "the norm of $\\vec{q}$",
+	.range = { .max=1 },
 };
 
 static HklMode *mode_q(void)
@@ -140,14 +146,15 @@ static void hkl_engine_q_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_q_new(void)
+HklEngine *hkl_engine_q_new(HklEngineList *engines)
 {
 	HklEngineQ *self;
 	HklMode *mode;
-	static const HklPseudoAxis *pseudo_axes[] = {&q};
+	static const HklParameter *pseudo_axes[] = {&q};
 	static const HklEngineInfo info = {
-		.name = "q",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("q",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY),
 	};
 	static const HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -156,8 +163,8 @@ HklEngine *hkl_engine_q_new(void)
 
 	self = HKL_MALLOC(HklEngineQ);
 
-	hkl_engine_init(&self->engine, &info, &operations);
-	self->q = register_pseudo_axis(&self->engine, &q.parameter);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
+	self->q = register_pseudo_axis(&self->engine, engines, &q);
 
 	/* q [default] */
 	mode = mode_q();
@@ -242,7 +249,7 @@ static int get_q2_real(HklMode *self,
 
 static HklMode *mode_q2(void)
 {
-	static const char* axes[] = {"gamma", "delta"};
+	static const char* axes[] = {GAMMA, DELTA};
 	static const HklFunction *functions[] = {&q2_func};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO("q2", axes, axes, functions),
@@ -255,10 +262,9 @@ static HklMode *mode_q2(void)
 	return hkl_mode_auto_new(&info, &operations, TRUE);
 }
 
-static const HklPseudoAxis alpha = {
-	.parameter = { HKL_PARAMETER_DEFAULTS_ANGLE, .name = "alpha",
-		       .description = "angle of the projection of $\\vec{q}$ on the $yOz$ plan and $\\vec{y}$",
-	},
+static const HklParameter alpha = {
+	HKL_PARAMETER_DEFAULTS_ANGLE, .name = "alpha",
+	.description = "angle of the projection of $\\vec{q}$ on the $yOz$ plan and $\\vec{y}$",
 };
 
 static void hkl_engine_q2_free_real(HklEngine *base)
@@ -268,14 +274,15 @@ static void hkl_engine_q2_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_q2_new(void)
+HklEngine *hkl_engine_q2_new(HklEngineList *engines)
 {
 	HklEngineQ2 *self;
 	HklMode *mode;
-	static const HklPseudoAxis *pseudo_axes[] = {&q, &alpha};
+	static const HklParameter *pseudo_axes[] = {&q, &alpha};
 	static const HklEngineInfo info = {
-		.name = "q2",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("q2",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY),
 	};
 	static const HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -284,9 +291,9 @@ HklEngine *hkl_engine_q2_new(void)
 
 	self = HKL_MALLOC(HklEngineQ2);
 
-	hkl_engine_init(&self->engine, &info, &operations);
-	self->q = register_pseudo_axis(&self->engine, &q.parameter);
-	self->alpha = register_pseudo_axis(&self->engine, &alpha.parameter);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
+	self->q = register_pseudo_axis(&self->engine, engines, &q);
+	self->alpha = register_pseudo_axis(&self->engine, engines, &alpha);
 
 	/* q2 [default] */
 	mode = mode_q2();
@@ -300,6 +307,8 @@ HklEngine *hkl_engine_q2_new(void)
 /* QperQpar */
 /************/
 
+typedef struct _HklModeIncidence HklModeQperQpar;
+
 struct _HklEngineQperQpar
 {
 	HklEngine engine;
@@ -311,13 +320,14 @@ static void _qper_qpar(HklEngine *engine,
 		       HklGeometry *geometry, HklDetector *detector,
 		       double *qper, double *qpar)
 {
+	HklModeQperQpar *mode = container_of(engine->mode, HklModeQperQpar, parent);
 	HklVector ki;
 	HklVector q;
 	HklVector n = {
 		.data = {
-			darray_item(engine->mode->parameters, 0)->_value,
-			darray_item(engine->mode->parameters, 1)->_value,
-			darray_item(engine->mode->parameters, 2)->_value,
+			mode->n_x->_value,
+			mode->n_y->_value,
+			mode->n_z->_value,
 		},
 	};
 	HklVector npar;
@@ -399,24 +409,10 @@ static int get_qper_qpar_real(HklMode *self,
 
 static HklMode *mode_qper_qpar(void)
 {
-	static const char* axes[] = {"gamma", "delta"};
+	static const char* axes[] = {GAMMA, DELTA};
 	static const HklFunction *functions[] = {&qper_qpar_func};
 	static const HklParameter parameters[] = {
-		{
-			HKL_PARAMETER_DEFAULTS,	.name = "x", ._value = 0,
-			.description = "the first coordinate of the surface vector",
-			.range = { .min=-1, .max=1 },
-		},
-		{
-			HKL_PARAMETER_DEFAULTS, .name = "y", ._value = 1,
-			.description = "the second coordinate of the surface vector",
-			.range = { .min=-1, .max=1 },
-		},
-		{
-			HKL_PARAMETER_DEFAULTS, .name = "z", ._value = 0,
-			.description = "the third coordinate of the surface vector",
-			.range = { .min=-1, .max=1 },
-		},
+		SURFACE_PARAMETERS(0, 1, 0),
 	};
 	static const HklModeAutoInfo info = {
 		HKL_MODE_AUTO_INFO_WITH_PARAMS("qper_qpar", axes, axes, functions, parameters),
@@ -426,7 +422,18 @@ static HklMode *mode_qper_qpar(void)
 		.get = get_qper_qpar_real,
 	};
 
-	return hkl_mode_auto_new(&info, &operations, TRUE);
+	HklModeQperQpar *self = HKL_MALLOC(HklModeQperQpar);
+
+	/* the base constructor; */
+	hkl_mode_auto_init(&self->parent,
+			   &info,
+			   &operations, TRUE);
+
+	self->n_x = register_mode_parameter(&self->parent, 0);
+	self->n_y = register_mode_parameter(&self->parent, 1);
+	self->n_z = register_mode_parameter(&self->parent, 2);
+
+	return &self->parent;
 }
 
 static void hkl_engine_qper_qpar_free_real(HklEngine *base)
@@ -436,24 +443,23 @@ static void hkl_engine_qper_qpar_free_real(HklEngine *base)
 	free(self);
 }
 
-HklEngine *hkl_engine_qper_qpar_new(void)
+HklEngine *hkl_engine_qper_qpar_new(HklEngineList *engines)
 {
-	static const HklPseudoAxis qper = {
-		.parameter = { HKL_PARAMETER_DEFAULTS, .name = "qper",
-			       .description = "perpendicular component of $\\vec{q}$ along the normal of the sample surface",
-			       .range = { .min=-1, .max=1 },
-		},
+	static const HklParameter qper = {
+		HKL_PARAMETER_DEFAULTS, .name = "qper",
+		.description = "perpendicular component of $\\vec{q}$ along the normal of the sample surface",
+		.range = { .min=-1, .max=1 },
 	};
-	static const HklPseudoAxis qpar = {
-		.parameter = { HKL_PARAMETER_DEFAULTS, .name = "qpar",
-			       .description = "parallel component of $\\vec{q}$",
-			       .range = { .min=-1, .max=1 },
-		},
+	static const HklParameter qpar = {
+		HKL_PARAMETER_DEFAULTS, .name = "qpar",
+		.description = "parallel component of $\\vec{q}$",
+		.range = { .min=-1, .max=1 },
 	};
-	static const HklPseudoAxis *pseudo_axes[] = {&qper, &qpar};
+	static const HklParameter *pseudo_axes[] = {&qper, &qpar};
 	static const HklEngineInfo info = {
-		.name = "qper_qpar",
-		.pseudo_axes = DARRAY(pseudo_axes),
+		HKL_ENGINE_INFO("qper_qpar",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY),
 	};
 	static const HklEngineOperations operations = {
 		HKL_ENGINE_OPERATIONS_DEFAULTS,
@@ -464,9 +470,9 @@ HklEngine *hkl_engine_qper_qpar_new(void)
 
 	self = HKL_MALLOC(HklEngineQperQpar);
 
-	hkl_engine_init(&self->engine, &info, &operations);
-	self->qper = register_pseudo_axis(&self->engine, &qper.parameter);
-	self->qpar = register_pseudo_axis(&self->engine, &qpar.parameter);
+	hkl_engine_init(&self->engine, &info, &operations, engines);
+	self->qper = register_pseudo_axis(&self->engine, engines, &qper);
+	self->qpar = register_pseudo_axis(&self->engine, engines, &qpar);
 
 	/* qper_qpar [default] */
 	mode = mode_qper_qpar();
diff --git a/hkl/hkl-pseudoaxis-common-readonly-private.h b/hkl/hkl-pseudoaxis-common-readonly-private.h
new file mode 100644
index 0000000..4adaef8
--- /dev/null
+++ b/hkl/hkl-pseudoaxis-common-readonly-private.h
@@ -0,0 +1,88 @@
+/* This file is part of the hkl library.
+ *
+ * The hkl library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The hkl library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
+ *                         L'Orme des Merisiers Saint-Aubin
+ *                         BP 48 91192 GIF-sur-YVETTE CEDEX
+ *
+ * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+ *          Maria-Teresa Nunez-Pardo-de-Verra <tnunez at mail.desy.de>
+ */
+#ifndef __HKL_PSEUDOAXIS_COMMON_READONLY_PRIVATE__
+#define __HKL_PSEUDOAXIS_COMMON_READONLY_PRIVATE__
+
+#include "hkl-pseudoaxis-private.h"
+
+typedef struct _HklModeIncidence HklModeIncidence;
+
+struct _HklModeIncidence
+{
+	HklMode parent;
+	HklParameter *n_x;
+	HklParameter *n_y;
+	HklParameter *n_z;
+};
+
+extern HklMode *hkl_mode_incidence_new(const HklModeInfo *info);
+
+extern HklEngine *hkl_engine_incidence_new(HklEngineList *engines);
+
+static inline double _incidence(const HklVector *v1, const HklVector *v2)
+{
+	return hkl_vector_angle(v1, v2) - M_PI_2;
+}
+
+/* mode parameters */
+
+#define SURFACE_PARAMETERS(_x, _y, _z)					\
+	{								\
+		HKL_PARAMETER_DEFAULTS, .name = "x", ._value = (_x),	\
+			.description = "the x coordinate of the surface $\\vec{n}$", \
+			.range = { .min=-1, .max=1 },			\
+			},						\
+	{								\
+		HKL_PARAMETER_DEFAULTS, .name = "y", ._value = (_y),	\
+			.description = "the y coordinate of the surface $\\vec{n}$", \
+			.range = { .min=-1, .max=1 },			\
+			},						\
+	{								\
+		HKL_PARAMETER_DEFAULTS, .name = "z", ._value = (_z),	\
+			.description = "the z coordinate of the surface $\\vec{n}$", \
+			.range = { .min=-1, .max=1 },			\
+			}
+
+static const HklParameter surface_parameters[] = {
+	SURFACE_PARAMETERS(0, 1, 0),
+};
+
+#define HKL_MODE_INFO_INCIDENCE_DEFAULTS(_name, _axes)			\
+	HKL_MODE_INFO_RO_WITH_PARAMS((_name), (_axes), surface_parameters)
+
+#define REGISTER_INCIDENCE_ENGINE(_name)				\
+	static HklEngine *hkl_engine_## _name ## _incidence_new(HklEngineList *engines) \
+	{								\
+		HklEngine *self;					\
+		HklMode *default_mode;					\
+		static const HklModeInfo info = {			\
+			HKL_MODE_INFO_INCIDENCE_DEFAULTS("incidence",	\
+							 _name ## _incidence_axes), \
+		};							\
+		self = hkl_engine_incidence_new(engines);		\
+		default_mode = hkl_mode_incidence_new(&info);		\
+		hkl_engine_add_mode(self, default_mode);		\
+		hkl_engine_mode_set(self, default_mode);		\
+		return self;						\
+	}
+#endif
diff --git a/hkl/hkl-pseudoaxis-common-readonly.c b/hkl/hkl-pseudoaxis-common-readonly.c
new file mode 100644
index 0000000..e066704
--- /dev/null
+++ b/hkl/hkl-pseudoaxis-common-readonly.c
@@ -0,0 +1,174 @@
+/* This file is part of the hkl library.
+ *
+ * The hkl library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The hkl library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
+ *                         L'Orme des Merisiers Saint-Aubin
+ *                         BP 48 91192 GIF-sur-YVETTE CEDEX
+ *
+ * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+ */
+#include "hkl-pseudoaxis-common-readonly-private.h"
+#include "hkl-pseudoaxis-private.h"
+
+typedef struct _HklEngineIncidence HklEngineIncidence;
+
+struct _HklEngineIncidence
+{
+	HklEngine engine;
+	HklParameter *incidence;
+	HklParameter *azimuth;
+};
+
+/********/
+/* mode */
+/********/
+
+#define HKL_MODE_INCIDENCE_ERROR hkl_mode_incidence_error_quark ()
+
+static GQuark hkl_mode_incidence_error_quark (void)
+{
+	return g_quark_from_static_string ("hkl-mode-incidence-error-quark");
+}
+
+typedef enum {
+	HKL_MODE_INCIDENCE_ERROR_GET, /* can not get the engine */
+	HKL_MODE_INCIDENCE_ERROR_SET, /* can not set the engine */
+} HklModeIncidenceError;
+
+static int hkl_mode_incidence_get_real(HklMode *base,
+				       HklEngine *engine,
+				       HklGeometry *geometry,
+				       HklDetector *detector,
+				       HklSample *sample,
+				       GError **error)
+{
+	HklVector ki;
+	double incidence;
+	double azimuth;
+	static const HklVector Y = {
+		.data = {0, 1, 0},
+	};
+
+	if (!base || !engine || !engine->mode || !geometry || !detector || !sample){
+		g_set_error(error,
+			    HKL_MODE_INCIDENCE_ERROR,
+			    HKL_MODE_INCIDENCE_ERROR_GET,
+			    "internal error");
+		return FALSE;
+	}
+	HklEngineIncidence *engine_incidence = container_of(engine, HklEngineIncidence, engine);
+	const HklModeIncidence *mode = container_of(base, HklModeIncidence, parent);
+	HklVector n = {
+		.data = {
+			mode->n_x->_value,
+			mode->n_y->_value,
+			mode->n_z->_value,
+		}
+	};
+
+	/* first check the parameters */
+	if (hkl_vector_is_null(&n)){
+		g_set_error(error,
+			    HKL_MODE_INCIDENCE_ERROR,
+			    HKL_MODE_INCIDENCE_ERROR_GET,
+			    "can not compute the incidence when the surface vector is null.");
+		return FALSE;
+	}
+
+	/* compute the orientation of the surface */
+	hkl_vector_rotated_quaternion(&n, &darray_item(geometry->holders, 0)->q);
+
+	hkl_source_compute_ki(&geometry->source, &ki);
+	incidence = _incidence(&n, &ki);
+
+	hkl_vector_project_on_plan(&n, &ki);
+	azimuth = hkl_vector_angle(&n, &Y);
+
+	engine_incidence->incidence->_value = incidence;
+	engine_incidence->azimuth->_value = azimuth;
+
+	return TRUE;
+}
+
+static int hkl_mode_readonly_set_real(HklMode *base,
+				      HklEngine *engine,
+				      HklGeometry *geometry,
+				      HklDetector *detector,
+				      HklSample *sample,
+				      GError **error)
+{
+	g_set_error(error,
+		    HKL_MODE_INCIDENCE_ERROR,
+		    HKL_MODE_INCIDENCE_ERROR_SET,
+		    "The \"%s\" engine is readonly", base->info->name);
+	return FALSE;
+}
+
+HklMode *hkl_mode_incidence_new(const HklModeInfo *info)
+{
+	static const HklModeOperations operations = {
+		HKL_MODE_OPERATIONS_DEFAULTS,
+		.capabilities = HKL_ENGINE_CAPABILITIES_READABLE,
+		.get = hkl_mode_incidence_get_real,
+		.set = hkl_mode_readonly_set_real,
+	};
+	HklModeIncidence *self = HKL_MALLOC(HklModeIncidence);
+
+	/* the base constructor; */
+	hkl_mode_init(&self->parent,
+		      info,
+		      &operations, TRUE);
+
+	self->n_x = register_mode_parameter(&self->parent, 0);
+	self->n_y = register_mode_parameter(&self->parent, 1);
+	self->n_z = register_mode_parameter(&self->parent, 2);
+
+	return &self->parent;
+}
+
+/*************/
+/* HklEngine */
+/*************/
+
+HklEngine *hkl_engine_incidence_new(HklEngineList *engines)
+{
+	HklEngineIncidence *self;
+	static const HklParameter incidence = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "incidence",
+		.description = "incidence of the incomming beam.",
+	};
+	static const HklParameter azimuth = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "azimuth",
+		.description = "azimuth of the sample surface (projection of $\\vec{n}$ on the $yOz$ plan",
+	};
+	static const HklParameter *pseudo_axes[] = {&incidence, &azimuth};
+	static HklEngineInfo info = {
+		HKL_ENGINE_INFO("incidence",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_SAMPLE),
+	};
+	static HklEngineOperations operations = {
+		HKL_ENGINE_OPERATIONS_DEFAULTS,
+	};
+
+	self = HKL_MALLOC(HklEngineIncidence);
+
+	hkl_engine_init(&self->engine, &info, &operations, engines);
+
+	self->incidence = register_pseudo_axis(&self->engine, engines, &incidence);
+	self->azimuth = register_pseudo_axis(&self->engine, engines, &azimuth);
+
+	return &self->engine;
+}
diff --git a/hkl/hkl-pseudoaxis-common-q-private.h b/hkl/hkl-pseudoaxis-common-tth-private.h
similarity index 68%
copy from hkl/hkl-pseudoaxis-common-q-private.h
copy to hkl/hkl-pseudoaxis-common-tth-private.h
index 97fa679..bf5074d 100644
--- a/hkl/hkl-pseudoaxis-common-q-private.h
+++ b/hkl/hkl-pseudoaxis-common-tth-private.h
@@ -13,28 +13,22 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
  * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
  */
-#ifndef __HKL_PSEUDOAXIS_COMMON_Q_PRIVATE_H__
-#define __HKL_PSEUDOAXIS_COMMON_Q_PRIVATE_H__
+#ifndef __HKL_PSEUDOAXIS_COMMON_TTH_PRIVATE_H__
+#define __HKL_PSEUDOAXIS_COMMON_TTH_PRIVATE_H__
 
 #include "hkl.h"
 
 G_BEGIN_DECLS
 
-typedef struct _HklEngineQ HklEngineQ;
-typedef struct _HklEngineQ2 HklEngineQ2;
-typedef struct _HklEngineQperQpar HklEngineQperQpar;
+typedef struct _HklEngineTth2 HklEngineTth2;
 
-extern double qmax(double wavelength);
-
-extern HklEngine *hkl_engine_q_new(void);
-extern HklEngine *hkl_engine_q2_new(void);
-extern HklEngine *hkl_engine_qper_qpar_new(void);
+extern HklEngine *hkl_engine_tth2_new(HklEngineList *engines);
 
 G_END_DECLS
 
diff --git a/hkl/hkl-pseudoaxis-common-tth.c b/hkl/hkl-pseudoaxis-common-tth.c
new file mode 100644
index 0000000..945a056
--- /dev/null
+++ b/hkl/hkl-pseudoaxis-common-tth.c
@@ -0,0 +1,173 @@
+/* This file is part of the hkl library.
+ *
+ * The hkl library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The hkl library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
+ *                         L'Orme des Merisiers Saint-Aubin
+ *                         BP 48 91192 GIF-sur-YVETTE CEDEX
+ *
+ * Authors: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
+ *          Jens Krüger <Jens.Krueger at frm2.tum.de>
+ */
+#include <gsl/gsl_errno.h>              // for ::GSL_SUCCESS
+#include <gsl/gsl_sf_trig.h>            // for gsl_sf_angle_restrict_symm
+#include <gsl/gsl_sys.h>                // for gsl_isnan
+#include <gsl/gsl_vector_double.h>      // for gsl_vector
+#include <math.h>                       // for sin, atan2, signbit
+#include <stdlib.h>                     // for free
+#include "hkl-detector-private.h"       // for hkl_detector_compute_kf
+#include "hkl-geometry-private.h"       // for _HklGeometry, HklHolder
+#include "hkl-macros-private.h"         // for HKL_MALLOC
+#include "hkl-parameter-private.h"      // for _HklParameter, etc
+#include "hkl-pseudoaxis-auto-private.h"  // for HklFunction, etc
+#include "hkl-pseudoaxis-common-tth-private.h"  // for HklEngineQ2, etc
+#include "hkl-pseudoaxis-private.h"     // for _HklEngine, etc
+#include "hkl-source-private.h"         // for hkl_source_compute_ki, etc
+#include "hkl-vector-private.h"         // for HklVector, hkl_vector_angle, etc
+#include "hkl.h"                        // for HklEngine, HklParameter, etc
+#include "hkl/ccan/array_size/array_size.h"  // for ARRAY_SIZE
+#include "hkl/ccan/container_of/container_of.h"  // for container_of
+#include "hkl/ccan/darray/darray.h"     // for darray_item
+
+
+/********/
+/* tth2 */
+/********/
+
+struct _HklEngineTth2
+{
+	HklEngine engine;
+	HklParameter *tth;
+	HklParameter *alpha;
+};
+
+static void _tth2(HklGeometry *geometry, HklDetector *detector,
+		double *tth, double *alpha)
+{
+	HklVector kf, ki;
+	static HklVector x = {
+		.data = {1, 0, 0},
+	};
+
+	hkl_source_compute_ki(&geometry->source, &ki);
+	hkl_detector_compute_kf(detector, geometry, &kf);
+	*tth = hkl_vector_angle(&ki, &kf);
+
+	/* project kf on the x plan to compute alpha */
+	hkl_vector_project_on_plan(&kf, &x);
+
+	*alpha = atan2(kf.data[2], kf.data[1]);
+
+}
+
+static int _tth2_func(const gsl_vector *x, void *params, gsl_vector *f)
+{
+	HklEngine *engine = params;
+	const HklEngineTth2 *engine_tth2 = container_of(engine, HklEngineTth2, engine);
+	double tth;
+	double alpha;
+
+	CHECK_NAN(x->data, x->size);
+
+	/* update the workspace from x */
+	set_geometry_axes(engine, x->data);
+
+	_tth2(engine->geometry, engine->detector, &tth, &alpha);
+
+	f->data[0] = engine_tth2->tth->_value - tth;
+	f->data[1] = engine_tth2->alpha->_value - alpha;
+
+	return  GSL_SUCCESS;
+}
+
+static const HklFunction tth2_func = {
+	.function = _tth2_func,
+	.size = 2,
+};
+
+static int get_tth2_real(HklMode *self,
+		       HklEngine *engine,
+		       HklGeometry *geometry,
+		       HklDetector *detector,
+		       HklSample *sample,
+		       GError **error)
+{
+	HklEngineTth2 *engine_tth2 = container_of(engine, HklEngineTth2, engine);
+
+	_tth2(geometry, detector,
+	      &engine_tth2->tth->_value,
+	      &engine_tth2->alpha->_value);
+
+	return TRUE;
+}
+
+static HklMode *mode_tth2(void)
+{
+	static const char* axes[] = {"gamma", "delta"};
+	static const HklFunction *functions[] = {&tth2_func};
+	static const HklModeAutoInfo info = {
+		HKL_MODE_AUTO_INFO("tth2", axes, axes, functions),
+	};
+	static const HklModeOperations operations = {
+		HKL_MODE_OPERATIONS_AUTO_DEFAULTS,
+		.get = get_tth2_real,
+	};
+
+	return hkl_mode_auto_new(&info, &operations, TRUE);
+}
+
+static void hkl_engine_tth2_free_real(HklEngine *base)
+{
+	HklEngineTth2 *self = container_of(base, HklEngineTth2, engine);
+	hkl_engine_release(&self->engine);
+	free(self);
+}
+
+HklEngine *hkl_engine_tth2_new(HklEngineList *engines)
+{
+	HklEngineTth2 *self;
+	HklMode *mode;
+
+	static const HklParameter tth = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name="tth",
+		.description = "the $2 \\theta$ angle",
+	};
+	static const HklParameter alpha = {
+		HKL_PARAMETER_DEFAULTS_ANGLE, .name = "alpha",
+		.description = "angle of the projection of $\\vec{q}$ on the $yOz$ plan and $\\vec{y}$",
+	};
+	static const HklParameter *pseudo_axes[] = {&tth, &alpha};
+	static const HklEngineInfo info = {
+		HKL_ENGINE_INFO("tth2",
+				pseudo_axes,
+				HKL_ENGINE_DEPENDENCIES_AXES),
+	};
+	static const HklEngineOperations operations = {
+		HKL_ENGINE_OPERATIONS_DEFAULTS,
+		.free=hkl_engine_tth2_free_real,
+	};
+
+	self = HKL_MALLOC(HklEngineTth2);
+
+	hkl_engine_init(&self->engine, &info, &operations, engines);
+	self->tth = register_pseudo_axis(&self->engine, engines, &tth);
+	self->alpha = register_pseudo_axis(&self->engine, engines, &alpha);
+
+	/* tth2 [default] */
+	mode = mode_tth2();
+	hkl_engine_add_mode(&self->engine, mode);
+	hkl_engine_mode_set(&self->engine, mode);
+
+	return &self->engine;
+}
diff --git a/hkl/hkl-pseudoaxis-private.h b/hkl/hkl-pseudoaxis-private.h
index e09ecd8..a3f801c 100644
--- a/hkl/hkl-pseudoaxis-private.h
+++ b/hkl/hkl-pseudoaxis-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -32,11 +32,11 @@
 #include "hkl-macros-private.h"         // for HKL_MALLOC
 #include "hkl-parameter-private.h"      // for hkl_parameter_list_free, etc
 #include "hkl.h"                        // for HklEngine, HklMode, etc
+#include "hkl/ccan/array_size/array_size.h"
 #include "hkl/ccan/darray/darray.h"     // for darray_foreach, etc
 
 G_BEGIN_DECLS
 
-typedef struct _HklPseudoAxis HklPseudoAxis;
 typedef struct _HklModeOperations HklModeOperations;
 typedef struct _HklModeInfo HklModeInfo;
 typedef struct _HklMode HklMode;
@@ -45,66 +45,6 @@ typedef struct _HklEngineOperations HklEngineOperations;
 
 typedef darray(HklMode *) darray_mode;
 
-/*****************/
-/* HklPseudoAxis */
-/*****************/
-
-struct _HklPseudoAxis
-{
-	HklParameter parameter;
-	HklEngine *engine;
-};
-
-
-#define HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS HKL_PARAMETER_OPERATIONS_DEFAULTS,	\
-		.copy = hkl_parameter_copy_pseudo_axis_real,		\
-		.free = hkl_parameter_free_pseudo_axis_real,		\
-		.fprintf = hkl_parameter_fprintf_pseudo_axis_real
-
-
-static inline HklParameter *hkl_parameter_copy_pseudo_axis_real(const HklParameter *self)
-{
-	HklPseudoAxis *pseudo_axis = container_of(self, HklPseudoAxis, parameter);
-	HklPseudoAxis *dup = HKL_MALLOC(HklPseudoAxis);
-
-	*dup = *pseudo_axis;
-
-	return &dup->parameter;
-}
-
-
-static inline void hkl_parameter_free_pseudo_axis_real(HklParameter *self)
-{
-	HklPseudoAxis *pseudo_axis = container_of(self, HklPseudoAxis, parameter);
-
-	free(pseudo_axis);
-}
-
-
-static inline void hkl_parameter_fprintf_pseudo_axis_real(FILE *f, const HklParameter *self)
-{
-	HklPseudoAxis *pseudo_axis = container_of(self, HklPseudoAxis, parameter);
-
-	hkl_parameter_fprintf_real(f, self);
-	fprintf(f, " %p", pseudo_axis->engine);
-}
-
-
-static inline HklParameter *hkl_parameter_new_pseudo_axis(const HklParameter *parameter,
-							  HklEngine *engine)
-{
-	HklPseudoAxis *self;
-	static HklParameterOperations ops = {HKL_PARAMETER_OPERATIONS_PSEUDOAXIS_DEFAULTS};
-
-	self = HKL_MALLOC(HklPseudoAxis);
-
-	self->parameter = *parameter;
-	self->parameter.ops = &ops;
-	self->engine = engine;
-
-	return &self->parameter;
-}
-
 /***********/
 /* HklMode */
 /***********/
@@ -116,8 +56,10 @@ struct _HklModeInfo {
 	const darray(const HklParameter) parameters;
 };
 
-#define HKL_MODE_INFO(_name, _axes_r, _axes_w) .name=_name, .axes_r=DARRAY(_axes_r), .axes_w=DARRAY(_axes_w)
+#define HKL_MODE_INFO_RO(_name, _axes) .name=_name, .axes_r=DARRAY(_axes)
+#define HKL_MODE_INFO(_name, _axes_r, _axes_w) HKL_MODE_INFO_RO((_name), (_axes_r)), .axes_w=DARRAY((_axes_w))
 
+#define HKL_MODE_INFO_RO_WITH_PARAMS(_name, _axes, _parameters) HKL_MODE_INFO_RO((_name), (_axes)), .parameters=DARRAY(_parameters)
 #define HKL_MODE_INFO_WITH_PARAMS(_name, _axes_r, _axes_w, _parameters)	\
 	HKL_MODE_INFO(_name, _axes_r, _axes_w), .parameters=DARRAY(_parameters)
 
@@ -229,7 +171,7 @@ static inline int hkl_mode_get_real(HklMode *self,
 				    GError **error)
 {
 	/* by default do nothing and no error */
-	return TRUE;
+	return FALSE;
 }
 
 
@@ -241,7 +183,7 @@ static inline int hkl_mode_set_real(HklMode *self,
 				    GError **error)
 {
 	/* by default do nothing and no error */
-	return TRUE;
+	return FALSE;
 }
 
 
@@ -306,9 +248,13 @@ static inline void hkl_mode_free(HklMode *self)
 
 struct _HklEngineInfo {
 	const char *name;
-	const darray(const HklPseudoAxis *) pseudo_axes;
+	const darray(const HklParameter *) pseudo_axes;
+	unsigned int dependencies;
 };
 
+#define HKL_ENGINE_INFO(_name, _pseudo_axes, _dependencies) .name = (_name), \
+		.pseudo_axes = DARRAY(_pseudo_axes),			\
+		.dependencies = (_dependencies)
 
 struct _HklEngine
 {
@@ -334,6 +280,7 @@ struct _HklEngineList
 	HklGeometry *geometry;
 	HklDetector *detector;
 	HklSample *sample;
+	darray_parameter pseudo_axes;
 };
 
 
@@ -392,15 +339,8 @@ static inline void hkl_engine_release(HklEngine *self)
 	darray_free(self->modes);
 
 	darray_free(self->axes);
-
-	/* release the HklPseudoAxe memory */
-	darray_foreach(pseudo_axis, self->pseudo_axes){
-		hkl_parameter_free(*pseudo_axis);
-	}
 	darray_free(self->pseudo_axes);
-
 	darray_free(self->pseudo_axis_names);
-
 	darray_free(self->mode_names);
 }
 
@@ -427,7 +367,8 @@ static inline void hkl_engine_free(HklEngine *self)
 
 static inline void hkl_engine_init(HklEngine *self,
 				   const HklEngineInfo *info,
-				   const HklEngineOperations *ops)
+				   const HklEngineOperations *ops,
+				   HklEngineList *engines)
 {
 	self->info = info;
 	self->ops = ops;
@@ -438,21 +379,35 @@ static inline void hkl_engine_init(HklEngine *self,
 	self->geometry = NULL;
 	self->detector = NULL;
 	self->sample = NULL;
+	self->engines = engines;
+
+	darray_append(*engines, self);
 }
 
 
-static inline void unregister_pseudo_axis(HklParameter *pseudo_axis)
+static inline HklParameter *register_mode_parameter(HklMode *mode, unsigned int index)
 {
-	hkl_parameter_free(pseudo_axis);
+	return darray_item(mode->parameters, index);
 }
 
-
 static inline HklParameter *register_pseudo_axis(HklEngine *self,
+						 HklEngineList *engines,
 						 const HklParameter *pseudo_axis)
 {
+	HklParameter **param;
 	HklParameter *parameter;
 
-	parameter = hkl_parameter_new_pseudo_axis(pseudo_axis, self);
+	/* try to find an already existing pseudo axis in the list. */
+	darray_foreach(param, engines->pseudo_axes){
+		if(!strcmp(pseudo_axis->name, (*param)->name)){
+			parameter = *param;
+			goto out;
+		}
+	}
+
+	parameter = hkl_parameter_new_copy(pseudo_axis);
+	darray_append(engines->pseudo_axes, parameter);
+out:
 	darray_append(self->pseudo_axes, parameter);
 	darray_append(self->pseudo_axis_names, parameter->name);
 	
@@ -550,7 +505,6 @@ static inline void hkl_engine_prepare_internal(HklEngine *self)
 static inline void hkl_engine_mode_set(HklEngine *self, HklMode *mode)
 {
 	self->mode = mode;
-	hkl_engine_prepare_internal(self);
 }
 
 
@@ -682,6 +636,8 @@ static inline HklEngineList *hkl_engine_list_new(void)
 	self->detector = NULL;
 	self->sample = NULL;
 
+	darray_init(self->pseudo_axes);
+
 	return self;
 }
 
@@ -699,31 +655,6 @@ static inline const HklEngineList *hkl_engine_list_new_copy(const HklEngineList
 	return NULL;
 }
 
-
-/**
- * hkl_engine_list_add: (skip)
- * @self: the engine list
- * @engine: the engine to add
- *
- * add an #HklEngine to the #HklEngineList
- *
- * Returns: HKL_SUCCESS or HKL_FAIL
- **/
-static inline int hkl_engine_list_add(HklEngineList *self,
-				      HklEngine *engine)
-{
-	if (!engine)
-		return FALSE;
-
-	/* set the engines to access the Geometries list. */
-	engine->engines = self;
-
-	darray_append(*self, engine);
-
-	return TRUE;
-}
-
-
 /**
  * hkl_engine_list_clear: (skip)
  * @self: the engine list to clear
@@ -733,11 +664,17 @@ static inline int hkl_engine_list_add(HklEngineList *self,
 static inline void hkl_engine_list_clear(HklEngineList *self)
 {
 	HklEngine **engine;
+	HklParameter **parameter;
 
 	darray_foreach(engine, *self){
 		hkl_engine_free(*engine);
 	}
 	darray_free(*self);
+
+	darray_foreach(parameter, self->pseudo_axes){
+		hkl_parameter_free(*parameter);
+	}
+	darray_free(self->pseudo_axes);
 }
 
 
diff --git a/hkl/hkl-pseudoaxis.c b/hkl/hkl-pseudoaxis.c
index c39bd19..af63c4a 100644
--- a/hkl/hkl-pseudoaxis.c
+++ b/hkl/hkl-pseudoaxis.c
@@ -14,7 +14,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -34,11 +34,6 @@
 #include "hkl/ccan/container_of/container_of.h"  // for container_of
 #include "hkl/ccan/darray/darray.h"     // for darray_foreach, darray_init, etc
 
-/*****************/
-/* HklPseudoAxis */
-/*****************/
-
-
 /***********/
 /* HklMode */
 /***********/
@@ -437,7 +432,7 @@ const HklParameter *hkl_engine_parameter_get(const HklEngine *self,
 }
 
 /**
- * hkl_engine_parameter_set: (skip)
+ * hkl_engine_parameter_set:
  * @self: the this ptr
  * @name: the name of the parameter to set. 
  * @parameter: the parameter to set.
@@ -459,10 +454,11 @@ int hkl_engine_parameter_set(HklEngine *self,
 
 	darray_foreach(p, self->mode->parameters)
 		if(!strcmp(name, (*p)->name)){
+			const char *old_name = (*p)->name;
 			hkl_parameter_init_copy(*p, parameter, NULL);
 			/* we do not check if the name is identical so force the right name */
 			/* TODO rethink this HklParameter assignement */
-			(*p)->name = name;
+			(*p)->name = old_name;
 			return TRUE;
 		}
 
@@ -582,6 +578,21 @@ int hkl_engine_initialized_set(HklEngine *self, int initialized, GError **error)
 }
 
 /**
+ * hkl_engine_dependencies_get:
+ * @self: the this ptr
+ *
+ * return all dependencies of the engine which are not mode parameters
+ * or axes. The possible combination of values are defined in
+ * #HklEngineDependencies enum.
+ *
+ * return value:
+ **/
+unsigned int hkl_engine_dependencies_get(const HklEngine *self)
+{
+	return self->info->dependencies;
+}
+
+/**
  * hkl_engine_fprintf: (skip)
  * @f: the FILE
  * @self: the HklEngine
diff --git a/hkl/hkl-quaternion-private.h b/hkl/hkl-quaternion-private.h
index a2dc158..3489ba4 100644
--- a/hkl/hkl-quaternion-private.h
+++ b/hkl/hkl-quaternion-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-quaternion.c b/hkl/hkl-quaternion.c
index 7da8520..63f0c3f 100644
--- a/hkl/hkl-quaternion.c
+++ b/hkl/hkl-quaternion.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-sample-private.h b/hkl/hkl-sample-private.h
index 4250db7..d98375d 100644
--- a/hkl/hkl-sample-private.h
+++ b/hkl/hkl-sample-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-sample.c b/hkl/hkl-sample.c
index 5bf688b..02d3342 100644
--- a/hkl/hkl-sample.c
+++ b/hkl/hkl-sample.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -1017,10 +1017,12 @@ int hkl_sample_reflection_hkl_set(HklSampleReflection *self,
 }
 
 /**
- * hkl_sample_reflection_flag_get: (skip)
- * @self:
+ * hkl_sample_reflection_flag_get:
+ * @self: the this ptr
  *
  * get the flag of the reflection
+ *
+ * Returns: the flag value
  **/
 int hkl_sample_reflection_flag_get(const HklSampleReflection *self)
 {
@@ -1028,11 +1030,11 @@ int hkl_sample_reflection_flag_get(const HklSampleReflection *self)
 }
 
 /**
- * hkl_sample_reflection_flag_set: (skip)
- * @self:
- * @flag:
+ * hkl_sample_reflection_flag_set:
+ * @self: the this ptr
+ * @flag: the value of the flag to set
  *
- * set the flag of the reglection
+ * set the flag of the reflection.
  **/
 void hkl_sample_reflection_flag_set(HklSampleReflection *self, int flag)
 {
@@ -1040,10 +1042,12 @@ void hkl_sample_reflection_flag_set(HklSampleReflection *self, int flag)
 }
 
 /**
- * hkl_sample_reflection_geometry_get: (skip)
- * @self:
+ * hkl_sample_reflection_geometry_get:
+ * @self: the this ptr
  *
- * set the geometry of the reflection
+ * get the #HklGeometry stored in the #HklSampleReflection
+ *
+ * Returns: the geometry saved into the reflection.
  **/
 const HklGeometry *hkl_sample_reflection_geometry_get(HklSampleReflection *self)
 {
@@ -1051,9 +1055,9 @@ const HklGeometry *hkl_sample_reflection_geometry_get(HklSampleReflection *self)
 }
 
 /**
- * hkl_sample_reflection_geometry_set: (skip)
- * @self:
- * @geometry:
+ * hkl_sample_reflection_geometry_set:
+ * @self: the this ptr
+ * @geometry: the geometry to set in the  #HklSampleReflection
  *
  * set the geometry of the reflection
  **/
diff --git a/hkl/hkl-source-private.h b/hkl/hkl-source-private.h
index fc69633..fbb0c7e 100644
--- a/hkl/hkl-source-private.h
+++ b/hkl/hkl-source-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-source.c b/hkl/hkl-source.c
index 10bef32..bdafd78 100644
--- a/hkl/hkl-source.c
+++ b/hkl/hkl-source.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-type-builtins.c b/hkl/hkl-type-builtins.c
index b6ad45a..2012861 100644
--- a/hkl/hkl-type-builtins.c
+++ b/hkl/hkl-type-builtins.c
@@ -67,6 +67,22 @@ hkl_engine_axis_names_get_get_type (void)
     return etype;
 }
 
+GType
+hkl_engine_dependencies_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GFlagsValue values[] = {
+            { HKL_ENGINE_DEPENDENCIES_AXES, "HKL_ENGINE_DEPENDENCIES_AXES", "axes" },
+            { HKL_ENGINE_DEPENDENCIES_ENERGY, "HKL_ENGINE_DEPENDENCIES_ENERGY", "energy" },
+            { HKL_ENGINE_DEPENDENCIES_SAMPLE, "HKL_ENGINE_DEPENDENCIES_SAMPLE", "sample" },
+            { 0, NULL, NULL }
+        };
+        etype = g_flags_register_static (g_intern_static_string ("HklEngineDependencies"), values);
+    }
+    return etype;
+}
+
 #define __HKL_TYPE_BUILTINS_C__
 
 /* Generated data ends here */
diff --git a/hkl/hkl-type-builtins.h b/hkl/hkl-type-builtins.h
index 2150eb0..e1d1569 100644
--- a/hkl/hkl-type-builtins.h
+++ b/hkl/hkl-type-builtins.h
@@ -19,6 +19,8 @@ HKLAPI GType hkl_engine_capabilities_get_type (void) G_GNUC_CONST;
 #define HKL_TYPE_ENGINE_CAPABILITIES (hkl_engine_capabilities_get_type ())
 HKLAPI GType hkl_engine_axis_names_get_get_type (void) G_GNUC_CONST;
 #define HKL_TYPE_ENGINE_AXIS_NAMES_GET (hkl_engine_axis_names_get_get_type ())
+HKLAPI GType hkl_engine_dependencies_get_type (void) G_GNUC_CONST;
+#define HKL_TYPE_ENGINE_DEPENDENCIES (hkl_engine_dependencies_get_type ())
 G_END_DECLS
 
 #endif /* __HKL_TYPE_BUILTINS_H__ */
diff --git a/hkl/hkl-types.c b/hkl/hkl-types.c
index c62e7a0..c35f729 100644
--- a/hkl/hkl-types.c
+++ b/hkl/hkl-types.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2011-2014 Synchrotron SOLEIL
+ * Copyright (C) 2011-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-types.h b/hkl/hkl-types.h
index 5ff7708..44a93c8 100644
--- a/hkl/hkl-types.h
+++ b/hkl/hkl-types.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-unit-private.h b/hkl/hkl-unit-private.h
index 8e8cc5e..18bc476 100644
--- a/hkl/hkl-unit-private.h
+++ b/hkl/hkl-unit-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-unit.c b/hkl/hkl-unit.c
index 36d65da..7db233e 100644
--- a/hkl/hkl-unit.c
+++ b/hkl/hkl-unit.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-vector-private.h b/hkl/hkl-vector-private.h
index 1edbbe1..13e02f5 100644
--- a/hkl/hkl-vector-private.h
+++ b/hkl/hkl-vector-private.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl/hkl-vector.c b/hkl/hkl-vector.c
index ec8260f..2171c94 100644
--- a/hkl/hkl-vector.c
+++ b/hkl/hkl-vector.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/hkl3d/hkl3d.h b/hkl3d/hkl3d.h
index 54f6f5b..0f8ca51 100644
--- a/hkl3d/hkl3d.h
+++ b/hkl3d/hkl3d.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2010-2014 Synchrotron SOLEIL
+ * Copyright (C) 2010-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/bindings/python.py b/tests/bindings/python.py
index 66968e1..e76dec3 100755
--- a/tests/bindings/python.py
+++ b/tests/bindings/python.py
@@ -213,7 +213,8 @@ class TestAPI(unittest.TestCase):
         for engine in engines.engines_get():
             capabilities = engine.capabilities_get()
             self.assertTrue(capabilities & Hkl.EngineCapabilities.READABLE)
-            self.assertTrue(capabilities & Hkl.EngineCapabilities.WRITABLE)
+            if engine.name_get() != "incidence":
+                self.assertTrue(capabilities & Hkl.EngineCapabilities.WRITABLE)
             if engine.name_get() == "psi":
                 self.assertTrue(capabilities & Hkl.EngineCapabilities.INITIALIZABLE)
 
@@ -227,6 +228,11 @@ class TestAPI(unittest.TestCase):
                 engine.initialized_set(True)
                 self.assertTrue(True == engine.initialized_get())
 
+        # check all the dependencies
+        for engine in engines.engines_get():
+            dependencies = engine.dependencies_get()
+            self.assertTrue(dependencies & Hkl.EngineDependencies.AXES)
+
     @unittest.skip("for testing figures")
     def test_doc_example(self):
         # execfile("../../Documentation/sphinx/source/bindings/python.py")
@@ -237,6 +243,43 @@ class TestAPI(unittest.TestCase):
 
         self.assertTrue(False)
 
+    def test_lattice_api(self):
+        lattice = Hkl.Lattice.new(1.54, 1.54, 1.54,
+                                  math.radians(90.),
+                                  math.radians(90.),
+                                  math.radians(90.))
+        lattice2 = lattice.copy()
+
+        # check all the accessors
+        a = lattice.a_get()
+        b = lattice.b_get()
+        c = lattice.c_get()
+        alpha = lattice.alpha_get()
+        beta = lattice.beta_get()
+        gamma = lattice.gamma_get()
+
+        lattice.a_set(a)
+        lattice.b_set(b)
+        lattice.c_set(c)
+        lattice.alpha_set(alpha)
+        lattice.beta_set(beta)
+        lattice.gamma_set(gamma)
+
+        # change the lattice parameter by expanding the tuple from
+        # the get method. the lattice should not change.
+        a, b, c, alpha, beta, gamma = lattice.get(Hkl.UnitEnum.DEFAULT)
+        lattice.set(a, b, c, alpha, beta, gamma, Hkl.UnitEnum.DEFAULT)
+
+        # now change the lattice parameter
+        lattice.set(1, 2, 3, 90, 90, 90, Hkl.UnitEnum.USER)
+
+        # this new lattice is different from the one in the sample
+        self.assertTrue(lattice.get(Hkl.UnitEnum.DEFAULT)
+                        != lattice2.get(Hkl.UnitEnum.DEFAULT))
+
+        del lattice2
+        del lattice
+
     def test_sample_api(self):
         """
         enforce the HklSample API
@@ -293,6 +336,9 @@ class TestAPI(unittest.TestCase):
         reciprocal = lattice.copy()
         lattice.reciprocal(reciprocal)
 
+        # get the lattice volume
+        lattice.volume_get()
+
         del sample
         del lattice
 
@@ -316,6 +362,14 @@ class TestAPI(unittest.TestCase):
         r2.hkl_set(1, 0, 1)
         self.assertTrue(r2.hkl_get() == (1.0, 0.0, 1.0))
 
+        # get the flag part
+        flag = r1.flag_get()
+        r1.flag_set(flag)
+
+        # get the geometry part
+        g = r1.geometry_get()
+        r1.geometry_set(g)
+
         # compute the angles
         sample.get_reflection_measured_angle(r1, r2)
         sample.get_reflection_theoretical_angle(r1, r2)
diff --git a/tests/hkl-axis-t.c b/tests/hkl-axis-t.c
index 23f5884..324bbf8 100644
--- a/tests/hkl-axis-t.c
+++ b/tests/hkl-axis-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-bench-t.c b/tests/hkl-bench-t.c
index ecd70c2..5985801 100644
--- a/tests/hkl-bench-t.c
+++ b/tests/hkl-bench-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -171,6 +171,7 @@ static void hkl_test_bench_eulerians(void)
 				hkl_engine_pseudo_axis_values_get(engine, values, ARRAY_SIZE(values),
 								   HKL_UNIT_DEFAULT, NULL);
 			}
+			hkl_geometry_list_free(solutions);
 		}
 	}
 
diff --git a/tests/hkl-detector-t.c b/tests/hkl-detector-t.c
index 090f4d5..16632b9 100644
--- a/tests/hkl-detector-t.c
+++ b/tests/hkl-detector-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-geometry-t.c b/tests/hkl-geometry-t.c
index 710fff2..545e335 100644
--- a/tests/hkl-geometry-t.c
+++ b/tests/hkl-geometry-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-interval-t.c b/tests/hkl-interval-t.c
index c9c89b3..f79a659 100644
--- a/tests/hkl-interval-t.c
+++ b/tests/hkl-interval-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-lattice-t.c b/tests/hkl-lattice-t.c
index da2ae26..9ce2fbc 100644
--- a/tests/hkl-lattice-t.c
+++ b/tests/hkl-lattice-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -25,7 +25,7 @@
 #include <tap/hkl-tap.h>
 
 #define CHECK_PARAM(_lattice, _param, _value)				\
-	is_double(_value,						\
+	is_double((_value),						\
 		  hkl_parameter_value_get(hkl_lattice_## _param ##_get(_lattice), \
 					  HKL_UNIT_DEFAULT),		\
 		  HKL_EPSILON, __func__);
@@ -276,6 +276,28 @@ static void reciprocal(void)
 	hkl_lattice_free(reciprocal);
 }
 
+static void volume(void)
+{
+	HklLattice *lattice;
+	HklLattice *reciprocal;
+	const HklParameter *volume;
+
+	lattice = hkl_lattice_new_default();
+	reciprocal = hkl_lattice_new_default();
+
+	/* cubic */
+	hkl_lattice_set(lattice, 1.54, 1.54, 1.54,
+			90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD,
+			HKL_UNIT_DEFAULT, NULL);
+	CHECK_PARAM(lattice, volume, 1.54*1.54*1.54);
+
+	hkl_lattice_reciprocal(lattice, reciprocal);
+	CHECK_PARAM(reciprocal, volume, (HKL_TAU * HKL_TAU * HKL_TAU)/(1.54*1.54*1.54));
+
+	hkl_lattice_free(lattice);
+	hkl_lattice_free(reciprocal);
+}
+
 static void get_B(void)
 {
 	HklMatrix *B_ref = hkl_matrix_new_full(HKL_TAU / 1.54, 0, 0,
@@ -326,12 +348,13 @@ static void get_1_B(void)
 
 int main(int argc, char** argv)
 {
-	plan(137);
+	plan(139);
 
 	new();
 	new_copy();
 	set();
 	reciprocal();
+	volume();
 	get_B();
 	get_1_B();
 
diff --git a/tests/hkl-matrix-t.c b/tests/hkl-matrix-t.c
index fc66070..999a338 100644
--- a/tests/hkl-matrix-t.c
+++ b/tests/hkl-matrix-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-parameter-t.c b/tests/hkl-parameter-t.c
index e9b2337..4096881 100644
--- a/tests/hkl-parameter-t.c
+++ b/tests/hkl-parameter-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-e4ch-t.c b/tests/hkl-pseudoaxis-e4ch-t.c
index 7e01e01..5cf6154 100644
--- a/tests/hkl-pseudoaxis-e4ch-t.c
+++ b/tests/hkl-pseudoaxis-e4ch-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-e4cv-t.c b/tests/hkl-pseudoaxis-e4cv-t.c
index 10f11ae..8f02902 100644
--- a/tests/hkl-pseudoaxis-e4cv-t.c
+++ b/tests/hkl-pseudoaxis-e4cv-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-e6c-t.c b/tests/hkl-pseudoaxis-e6c-t.c
index eb97399..8550c21 100644
--- a/tests/hkl-pseudoaxis-e6c-t.c
+++ b/tests/hkl-pseudoaxis-e6c-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-k4cv-t.c b/tests/hkl-pseudoaxis-k4cv-t.c
index 00bce71..7067be0 100644
--- a/tests/hkl-pseudoaxis-k4cv-t.c
+++ b/tests/hkl-pseudoaxis-k4cv-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-k6c-t.c b/tests/hkl-pseudoaxis-k6c-t.c
index 5a900dc..24a7019 100644
--- a/tests/hkl-pseudoaxis-k6c-t.c
+++ b/tests/hkl-pseudoaxis-k6c-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-pseudoaxis-t.c b/tests/hkl-pseudoaxis-t.c
index b51c946..1cfe369 100644
--- a/tests/hkl-pseudoaxis-t.c
+++ b/tests/hkl-pseudoaxis-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
@@ -84,7 +84,7 @@ static int __test(unsigned int nb_iter, test_func f, int foreach_mode)
 	return res;
 }
 
-#define TEST(_nb_iter, _f) __test(_nb_iter, _f, 0)
+#define TEST_FOREACH_ENGINE(_nb_iter, _f) __test(_nb_iter, _f, 0)
 #define TEST_FOREACH_MODE(_nb_iter, _f) __test(_nb_iter, _f, 1)
 
 static void factories(void)
@@ -196,6 +196,7 @@ static int _set(HklEngine *engine, HklEngineList *engine_list, unsigned int n)
 			for(j=0; j<n_pseudo_axes; ++j)
 				res &= DIAG(fabs(targets[j] - currents[j]) < HKL_EPSILON);
 		}
+		hkl_geometry_list_free(solutions);
 	}else{
 		res &= DIAG(error != NULL);
 		g_clear_error(&error);
@@ -263,7 +264,7 @@ static int _pseudo_axis_get(HklEngine *engine, HklEngineList *engine_list, unsig
 
 static void pseudo_axis_get(void)
 {
-	ok(TRUE == TEST(1, _pseudo_axis_get), __func__);
+	ok(TRUE == TEST_FOREACH_ENGINE(1, _pseudo_axis_get), __func__);
 }
 
 static int _capabilities(HklEngine *engine, HklEngineList *engine_list, unsigned int n)
@@ -271,9 +272,12 @@ static int _capabilities(HklEngine *engine, HklEngineList *engine_list, unsigned
 	int res = TRUE;
 	const unsigned long capabilities = hkl_engine_capabilities_get(engine);
 
-	/* all motors must have the read/write capabilities */
+	/* all motors must have the read capabilities */
 	res &= DIAG((capabilities & HKL_ENGINE_CAPABILITIES_READABLE) != 0);
-	res &= DIAG((capabilities & HKL_ENGINE_CAPABILITIES_WRITABLE) != 0);
+
+	/* all engines except the readonly (incidence) are writable */
+	if(strcmp("incidence", hkl_engine_name_get(engine)))
+		res &= DIAG((capabilities & HKL_ENGINE_CAPABILITIES_WRITABLE) != 0);
 
 	/* all psi engines must be initialisable */
 	if(!strcmp("psi", hkl_engine_name_get(engine)))
@@ -380,7 +384,7 @@ static int _modes(HklEngine *engine, HklEngineList *engine_list, unsigned int n)
 
 static void modes(void)
 {
-	ok(TRUE == TEST(1, _modes), __func__);
+	ok(TRUE == TEST_FOREACH_ENGINE(1, _modes), __func__);
 }
 
 static int _check_axes(const darray_string *axes, const darray_string *refs)
@@ -435,7 +439,7 @@ static void axis_names(void)
 
 static int _parameters(HklEngine *engine, HklEngineList *engine_list, unsigned int n)
 {
-	static const char *bad = "__bad_parameer_name__";
+	static const char *bad = "__bad_parameter_name__";
 	int res = TRUE;
 	GError *error = NULL;
 	const char **parameter;
@@ -491,12 +495,47 @@ static void parameters(void)
 	ok(TRUE == TEST_FOREACH_MODE(1, _parameters), __func__);
 }
 
+static int _depends(HklEngine *engine, HklEngineList *engine_list, unsigned int n)
+{
+	int res = TRUE;
+	const char *name = hkl_engine_name_get(engine);
+	const unsigned int depends = hkl_engine_dependencies_get(engine);
+
+	if(!strcmp("hkl", name))
+		res &= DIAG((depends & (HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY | HKL_ENGINE_DEPENDENCIES_SAMPLE)) != 0);
+	if(!strcmp("eulerians", hkl_engine_name_get(engine))){
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_AXES) != 0);
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_ENERGY) == 0);
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_SAMPLE) == 0);
+	}
+	if(!strcmp("q", name)){
+		res &= DIAG((depends &(HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY)) != 0);
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_SAMPLE) == 0);
+	}
+	if(!strcmp("q2", name)){
+		res &= DIAG((depends &(HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY)) != 0);
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_SAMPLE) == 0);
+	}
+	if(!strcmp("qper_qpar", name)){
+		res &= DIAG((depends & (HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY)) != 0);
+		res &= DIAG((depends & HKL_ENGINE_DEPENDENCIES_SAMPLE) == 0);
+	}
+	if(!strcmp("psi", name))
+		res &= DIAG((depends & (HKL_ENGINE_DEPENDENCIES_AXES | HKL_ENGINE_DEPENDENCIES_ENERGY | HKL_ENGINE_DEPENDENCIES_SAMPLE)) != 0);
+
+	return res;
+}
+
+static void depends(void)
+{
+	ok(TRUE == TEST_FOREACH_ENGINE(1, _depends), __func__);
+}
 
 int main(int argc, char** argv)
 {
 	double n;
 
-	plan(9);
+	plan(10);
 
 	if (argc > 1)
 		n = atoi(argv[1]);
@@ -512,6 +551,7 @@ int main(int argc, char** argv)
 	modes();
 	axis_names();
 	parameters();
+	depends();
 
 	return 0;
 }
diff --git a/tests/hkl-pseudoaxis-zaxis-t.c b/tests/hkl-pseudoaxis-zaxis-t.c
index cd28551..d7f49b9 100644
--- a/tests/hkl-pseudoaxis-zaxis-t.c
+++ b/tests/hkl-pseudoaxis-zaxis-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-quaternion-t.c b/tests/hkl-quaternion-t.c
index 2c34dc4..5e17276 100644
--- a/tests/hkl-quaternion-t.c
+++ b/tests/hkl-quaternion-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-sample-t.c b/tests/hkl-sample-t.c
index 747c6e1..dd65ecd 100644
--- a/tests/hkl-sample-t.c
+++ b/tests/hkl-sample-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-source-t.c b/tests/hkl-source-t.c
index 1b515c6..23b96fa 100644
--- a/tests/hkl-source-t.c
+++ b/tests/hkl-source-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-unit-t.c b/tests/hkl-unit-t.c
index ce32e72..0d1d72a 100644
--- a/tests/hkl-unit-t.c
+++ b/tests/hkl-unit-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl-vector-t.c b/tests/hkl-vector-t.c
index a1b9bee..8c131c9 100644
--- a/tests/hkl-vector-t.c
+++ b/tests/hkl-vector-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/hkl3d-test-t.c b/tests/hkl3d-test-t.c
index 03be40c..2a4746c 100644
--- a/tests/hkl3d-test-t.c
+++ b/tests/hkl3d-test-t.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2010-2014 Synchrotron SOLEIL
+ * Copyright (C) 2010-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *
diff --git a/tests/tap/hkl-tap.h b/tests/tap/hkl-tap.h
index 041fe41..45ffba4 100644
--- a/tests/tap/hkl-tap.h
+++ b/tests/tap/hkl-tap.h
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with the hkl library.  If not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright (C) 2003-2014 Synchrotron SOLEIL
+ * Copyright (C) 2003-2015 Synchrotron SOLEIL
  *                         L'Orme des Merisiers Saint-Aubin
  *                         BP 48 91192 GIF-sur-YVETTE CEDEX
  *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hkl.git



More information about the debian-science-commits mailing list