xarray_vectors

File Purpose: tools related to xarray vector arithmetic along ‘component’ dimension,

probably with ‘x’, ‘y’, ‘z’ components.
NOTE: functions with multiple vector inputs here are not registered here with pcAccessor.
See vector_arithmetic.py for similar versions which ARE registered with pcAccessor.
(Those versions might eventually be updated to reference-frame-aware checks,
taking Component machinery under consideration.
The versions here will instead never do any implicit reference frame rotations.)

Functions

_get_basis([_basis])

return proper BasisXYZ to use.

xarray_angle_xy(A)

return angle between +xhat and A, in the xy plane, in radians.

xarray_angle_xy_to_hat(A, *[, _basis])

return unit vector u, given angle [radians] between +xhat and u in the xy plane.

xarray_cross_component(A, B, x, *[, yz, ...])

return x component of A cross B, given A and B which have values for y and z 'component'.

xarray_cross_product(A, B, *[, components, ...])

return cross product of vectors A and B, along dimension 'component'.

xarray_dot_product(A, B)

return dot product of vectors A and B, assuming vector components along the dimension 'component'.

xarray_join_xyz(x, y, z, *[, _basis])

return vector with components x, y, z along 'component' dimension.

xarray_magnitude(A, *[, squared])

return vector magnitude of A, assuming vector components along the dimension 'component'.

xarray_parallel(A, B)

return the component of A parallel to B.

xarray_parmod(A, B, *[, signed])

return the magnitude of the component of A parallel to B.

xarray_perp(A, B)

return the component of A perpendicular to B.

xarray_perpmod(A, B)

return the magnitude of the component of A perpendicular to B.

xarray_rmscomps(A)

return root mean squared of components of A.

xarray_take_parallel_to(B, A)

return the component of A parallel to B.

xarray_take_perp_to(B, A)

return the component of A perpendicular to B.

xarray_take_xyz(A, *[, drop, as_dict])

return [Ax, Ay, Az] from selecting 'x', 'y', 'z' along 'component' dimension.

xarray_unit_vector(A)

return a unit vector in the direction of A.

Classes

BasisXYZ(XYZ)

simple class to hold X, Y, Z component details.