transform_vectors_sph_to_cart#
- transform_vectors_sph_to_cart(
- *,
- theta: VectorLikeFloat,
- phi: VectorLikeFloat,
- r: VectorLikeFloat,
- u: ArrayLikeFloat,
- v: ArrayLikeFloat,
- w: ArrayLikeFloat,
Transform vectors from spherical (r, phi, theta) to Cartesian coordinates (z, y, x).
Note the “reverse” order of arrays’s axes, commonly used in geosciences.
- Parameters:
- theta
VectorLikeFloat Azimuthal angle in degrees
[0, 360]of shape(M,).- phi
VectorLikeFloat Polar (zenith) angle in degrees
[0, 180]of shape(N,).- r
VectorLikeFloat Distance (radius) from the point of origin of shape
(P,).- u
ArrayLikeFloat X-component of the vector of shape
(M, N, P)with length-one axes dropped.- v
ArrayLikeFloat Y-component of the vector of shape
(M, N, P)with length-one axes dropped.- w
ArrayLikeFloat Z-component of the vector of shape
(M, N, P)with length-one axes dropped.
- theta
- Returns:
- u_t, v_t, w_t
numpy.ndarray Arrays of transformed x-, y-, z-components, respectively.
- u_t, v_t, w_t
Used In#
Gallery Examples