rotate#
- mrinufft.trajectories.tools.rotate(trajectory: ndarray[tuple[int, ...], dtype[_ScalarType_co]], nb_rotations: int, x_tilt: str | float | None = None, y_tilt: str | float | None = None, z_tilt: str | float | None = None) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]#
Rotate 2D or 3D trajectories over the different axes.
- Parameters:
trajectory (NDArray) – Trajectory in 2D or 3D to rotate.
nb_rotations (int) – Number of rotations repeating the provided trajectory.
x_tilt (str | float, optional) – Tilt of the trajectory over the \(k_x\)-axis, by default None.
y_tilt (str | float, optional) – Tilt of the trajectory over the \(k_y\)-axis, by default None.
z_tilt (str | float, optional) – Tilt of the trajectory over the \(k_z\)-axis, by default None.
- Returns:
Rotated trajectory.
- Return type:
NDArray