treams.special.vcar2sph¶
- treams.special.vcar2sph(v, r) = <ufunc 'vcar2sph'>¶
Convert vector in cartesian coordinates to vector in spherical coordinates
The cartesian vector \((v_x, v_y, v_z)\) at coordinates \((x, y, z)\) is converted to \((v_r, v_\theta, v_\varphi)\) with
\[\begin{split}\begin{pmatrix} v_r \\ v_\theta \\ v_\varphi \end{pmatrix} = \begin{pmatrix} \sin \theta \cos \varphi & \sin \theta \sin \varphi & \cos \theta \\ \cos \theta \cos \varphi & \cos \theta \sin \varphi & \cos \theta \\ -\sin \varphi & \cos \varphi & 0 \end{pmatrix} \begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix}\end{split}\]- Parameters:
v (float or complex, 3-array) – Vector in 3-dimensional cartesian space
r (float, 3-array) – Cartesian coordinates in 3-dimensional space
- Returns:
float or complex, 3-array