Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions base_classes/NXtransformations.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
group is equally possible.


Following the section on the general dscription of axis in NXtransformations is a section which
Following the section on the general description of axis in NXtransformations is a section which
documents the fields commonly used within NeXus for positioning purposes and their meaning. Whenever
there is a need for positioning a beam line component please use the existing names. Use as many fields
as needed in order to position the component. Feel free to add more axis if required. In the description
Expand All @@ -111,7 +111,7 @@

NOTE

NXtransformations follows the **active** transformation convention. This means that the transformation describes
``NXtransformations`` follows the **active** transformation convention. This means that the transformation describes
how an object is moved or rotated within the coordinate system. In other words, the transformation
actively changes the position or orientation of the object itself. This is in contrast to a **passive** transformation,
which changes the frame of reference or coordinate system, while the object remains fixed. In case it is needed
Expand All @@ -136,7 +136,7 @@
in which case the values are angular rotations around the axis.

If this attribute is omitted, this is an axis for which there
is no motion to be specifies, such as the direction of gravity,
is no motion to be specified, such as the direction of gravity,
or the direction to the source, or a basis vector of a
coordinate frame. In this case the value of the ``AXISNAME`` field
is not used and can be set to the number ``NaN``.
Expand All @@ -151,16 +151,32 @@
<doc>
Three values that define the axis for this transformation.
The axis should be normalized to unit length, making it
dimensionless. For ``rotation`` axes, the direction should be
chosen for a right-handed rotation with increasing angle.
dimensionless.
For ``translation`` axes the direction should be chosen for
increasing displacement. For general axes, an appropriate direction
should be chosen.

Note that if the ``NXtransformation`` depends on a coordinate system
(i.e., its ``depends_on`` attribute points to an instance :ref:`NXcoordinate_system`),
the rotation is right handed in that coordinate system, even if the the coordinate system
itself is left-handed (as defined by the determinant of its base vectors).
By default, for ``rotation`` axes that do not explicitly depend on a coordinate system,
the direction should be chosen for a right-handed rotation with increasing angle. Note,
McStas is a right handed coordinate system.

If the ``NXtransformation`` depends on a coordinate system (i.e., its ``depends_on``
attribute (or a ``depends_on`` further up the transformation chain) points to an instance
of :ref:`NXcoordinate_system`), the rotation convention is the same as the handedness
of the coordinate system (as defined by the determinant of its base vectors):

* Rotations in left-handed coordinate systems are left-handed (i.e., they follow the
left-hand grip rule). In a left-handed coordinate system, positive rotation about an
axis is clockwise when looking from a point on the positive axis towards
its origin (from infinity towards the origin).

* Rotations in right-handed coordinate systems are right-handed (i.e., they follow the
right-hand grip rule). In a right-handed coordinate system, positive rotation about an
axis is counter-clockwise when looking from a point on the positive axis towards
its origin (from infinity towards the origin).

Note that by using this convention, the transformation matrices in both left- and
right-handed coordinate systems are the same.
</doc>
<dimensions rank="1">
<dim index="1" value="3" />
Expand Down