vectorised_spherical_polars_to_cartesians#
- diffsims.utils.vector_utils.vectorised_spherical_polars_to_cartesians(z)[source]#
Converts an array of spherical polars into an array of (x,y,z) = r(cos(psi)sin(theta),sin(psi)sin(theta),cos(theta))
- Parameters:
z (np.array) – With rows of r : the radius value, r = sqrt(x**2+y**2+z**2) psi : The azimuthal angle generally (0,2pi]) theta : The elevation angle generally (0,pi)
- Returns:
xyz – With rows of x,y,z
- Return type:
np.array