xicsrt_math_jax

xicsrt.tools.xicsrt_math_jax

A set of mathematical function with jax acceleration. Many of these functions are exact copies or slight modification of the functions in xicsrt_math. Other function are specific to this module.

Programming Notes

These module was developed to support some specific modeling work by N. Pablant and is not used in any of the built-in xicsrt code. There is no plan to support jax generally within xicsrt, so I am not really sure of the best way to handle this module for the moment. Maybe move it into xicsrt_contrib?

toarray_1d(a)[source]

Convert the input to a ndarray with at least 1 dimension. This is similar to the numpy function atleast_1d, but has less overhead and is jax compatible.

vector_angle(a, b)[source]

Find the angle between two vectors.

vector_rotate(a, b, theta)[source]

Rotate vector a around vector b by an angle theta (radians)

Programming Notes

u: parallel projection of a on b_hat. v: perpendicular projection of a on b_hat. w: a vector perpendicular to both a and b.

sinusoidal_spiral(phi, b, r0, theta0)[source]
point_to_external(point_local, orientation, origin)[source]
point_to_local(point_external, orientation, origin)[source]
vector_to_external(vector, orientation)[source]
vector_to_local(vector, orientation)[source]

Private Members