pyspinw.basis#
Functions for working with different basis vectors
Functions
|
Get a matrix for rotation by |
Show some plots demonstrating the angle-axis rotations |
|
Example / test for find_aligned_basis |
|
|
Find a set of orthonormal basis vectors aligned with the first being aligned to the input vectors |
|
Return an aligned basis as an n-by-3-by-3 matrix |
- pyspinw.basis.angle_axis_rotation_matrix(angle_rad, axis: ndarray)#
Get a matrix for rotation by
angle_radradians around the axisaxis
- pyspinw.basis.demo_angle_axis_rotation_matrix()#
Show some plots demonstrating the angle-axis rotations
- pyspinw.basis.demo_find_aligned_basis()#
Example / test for find_aligned_basis
- pyspinw.basis.find_aligned_basis(vectors: ndarray, rcond: float | None = None) tuple[ndarray, ndarray, ndarray]#
Find a set of orthonormal basis vectors aligned with the first being aligned to the input vectors
- Parameters:
vectors – an n-by-3 numpy array containing the vectors to use to calculate the basis
rcond – tolerance on the calculation, default is 3 * machine precision
- pyspinw.basis.site_rotations(vectors: ndarray, rcond: float | None = None)#
Return an aligned basis as an n-by-3-by-3 matrix