transform_vectors_sph_to_cart#
- transform_vectors_sph_to_cart(
- *,
- theta: VectorLike[float],
- phi: VectorLike[float],
- r: VectorLike[float],
- u: ArrayLike[float],
- v: ArrayLike[float],
- w: ArrayLike[float],
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
VectorLike[float] Azimuthal angle in degrees
[0, 360]of shape(M,).- phi
VectorLike[float] Polar (zenith) angle in degrees
[0, 180]of shape(N,).- r
VectorLike[float] Distance (radius) from the point of origin of shape
(P,).- u
ArrayLike[float] X-component of the vector of shape
(M, N, P)with length-one axes dropped.- v
ArrayLike[float] Y-component of the vector of shape
(M, N, P)with length-one axes dropped.- w
ArrayLike[float] 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