rot_z#

anri.geom.rot_z(angle)[source]#

Return rotation matrix for positive right-handed rotation about the Z axis by angle (degrees).

Parameters:

angle (float) – Rotation angle in degrees

Returns:

R (jax.Array) – [3,3] Rotation matrix

Notes

An example - with 90 degrees: Rz(90) @ (X,Y,Z)_sample = (Y,-X,Z)_lab

Imagine a diffractometer. If we rotate it 90 degrees, via the right-hand rule, the sample X axis goes to lab Y.

Therefore we get R @ v_sample = v_lab.