weldx.transformations.WXRotation.reduce#
- WXRotation.reduce(self, left=None, right=None, return_indices=False)#
Reduce this rotation with the provided rotation groups.
Reduction of a rotation
pis a transformation of the formq = l * p * r, wherelandrare chosen fromleftandrightrespectively, such that rotationqhas the smallest magnitude.If
leftandrightare rotation groups representing symmetries of two objects rotated byp, thenqis the rotation of the smallest magnitude to align these objects considering their symmetries.- Parameters:
left (
Rotationinstance, optional) – Object containing the left rotation(s). Default value (None) corresponds to the identity rotation.right (
Rotationinstance, optional) – Object containing the right rotation(s). Default value (None) corresponds to the identity rotation.return_indices (bool, optional) – Whether to return the indices of the rotations from
leftandrightused for reduction.
- Returns:
reduced (
Rotationinstance) – Object containing reduced rotations.left_best, right_best (integer ndarray) – Indices of elements from
leftandrightused for reduction.