spheres.coordinates.sph_xyz¶
-
spheres.coordinates.
sph_xyz
(sph)[source]¶ Converts spherical coordinates \((\theta, \phi)\) to cartesian coordinates \((x, y, z)\). We use the physicist’s convention: \(\theta \in [0, \pi]\), \(\phi \in [0, 2\pi]\).
\(x = \sin{\theta}\cos(\phi)\)\(y = \sin{\theta}\sin(\phi)\)\(z = \cos(\theta)\)- Parameters
sph (list/np.ndarray) – (List of) Spherical coordinates.
- Returns
xyz – (List of) Cartesian coordinates.
- Return type
np.ndarray