magnopy.span_local_rfs#

magnopy.span_local_rfs(directional_vectors, hybridize=False)[source]#

Span a series of local right-handed reference frames based on a series of the direction vectors.

Parameters:
direction_vectors(M, 3) array-like

Direction of the z axis of the local reference frames.

hybridizebool, default False
  • If hybridize == True, then returns p_alphas, z_alphas.

  • If hybridize == False, then returns x_alphas, y_alphas, z_alphas.

Returns:
x_alphas(M, 3) numpy.ndarray
y_alphas(M, 3) numpy.ndarray
p_alphas(M, 3) numpy.ndarray

p_alpha = x_alpha + 1j * y_alpha.

z_alphas(M, 3) numpy.ndarray

See also

span_local_rf

Examples

>>> import magnopy
>>> x, y, z = magnopy.span_local_rfs([[0, 0, 1], [0, 0, -1], [1, 1, 1]])
>>> x
array([[ 1.        ,  0.        ,  0.        ],
       [ 0.        , -1.        ,  0.        ],
       [ 0.78867513, -0.21132487, -0.57735027]])
>>> y
array([[ 0.        ,  1.        ,  0.        ],
       [-1.        ,  0.        ,  0.        ],
       [-0.21132487,  0.78867513, -0.57735027]])
>>> z
array([[ 0.        ,  0.        ,  1.        ],
       [ 0.        ,  0.        , -1.        ],
       [ 0.57735027,  0.57735027,  0.57735027]])