rotate_vector

ssapy.utils.rotate_vector(v_unit, theta, phi, plot_path=False, save_idx=False)[source][source]

Rotates a unit vector by specified angles and optionally plots the rotation path.

Parameters:

v_unit (ndarray): Input unit vector to be rotated. theta (float): Rotation angle (in degrees) around a perpendicular axis. phi (float): Rotation angle (in degrees) around the input vector. plot_path (str, optional): Path to save the rotation plot. Defaults to False (no plot). save_idx (int, optional): Index for saving the plot file. Defaults to False.

Returns:

ndarray: Rotated unit vector.