scipp.spatial.translations#

scipp.spatial.translations(*, dims, unit=Unit(1), values)#

Creates translation transformations from multiple 3-vectors.

Parameters:
Returns:

Variable – An array variable of dtype translation3.

See also

scipp.spatial.translation

Create a single translation transformation.

Examples

Create multiple translations along different axes:

>>> import scipp as sc
>>> trans = sc.spatial.translations(
...     dims=['x'],
...     values=[[1, 0, 0], [0, 1, 0], [0, 0, 1]],
...     unit='m'
... )
>>> trans
<scipp.Variable> (x: 3)  translation3              [m]  [(1, 0, 0), (0, 1, 0), (0, 0, 1)]