treams.special.vsph2car

treams.special.vsph2car(v, r) = <ufunc 'vsph2car'>

Convert vector in spherical coordinates to vector in cartesian coordinates

The spherical vector \((v_r, v_\theta, v_\varphi)\) at coordinates \((r, \theta, \varphi)\) is converted to \((v_x, v_y, v_z)\) with

\[\begin{split}\begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix} = \begin{pmatrix} \sin \theta \cos \varphi & \cos \theta \cos \varphi & -\sin \varphi \\ \sin \theta \sin \varphi & \cos \theta \sin \varphi & \cos \varphi \\ \cos \theta & -\sin \theta & 0 \end{pmatrix} \begin{pmatrix} v_r \\ v_\theta \\ v_\varphi \end{pmatrix}\end{split}\]
Parameters:
  • v (float or complex, 3-array) – Vector in 3-dimensional spherical space

  • r (float, 3-array) – Spherical coordinates in 3-dimensional space

Returns:

float or complex, 3-array