openlifu.geo.cartesian_to_spherical_vectorized¶
- openlifu.geo.cartesian_to_spherical_vectorized(p: ndarray) ndarray[source]¶
Convert cartesian coordinates to spherical coordinates
- Parameters:
p – an array of shape (…,3), where the last axis describes point cartesian coordinates x,y,z.
- Returns: An array of shape (…,3), where the last axis describes point spherical coordinates r, theta, phi, where
r is the radial spherical coordinate, a nonnegative float. theta is the polar spherical coordinate, aka the angle off the z-axis, aka the non-azimuthal spherical angle.
theta is in the range [0,pi].
phi is the azimuthal spherical coordinate, in the range [-pi,pi]
Angles are in radians.