- qspec. e_r ( theta , phi , axis=-1 )[source]
-
The radial unit vector of the orthonormal system
$$ \hat{e}_r = \begin{pmatrix}\sin(\theta)\\ \cos(\theta)\sin(\phi)\\ \cos(\theta)\cos(\phi)\end{pmatrix}, $$such that $\hat{e}_x = \hat{e}_r(\pi/2, \phi)$, $\hat{e}_y = \hat{e}_r(0, \pi/2)$ and $\hat{e}_z = \hat{e}_r(0, 0)$.
- Parameters:
-
- thetaarray_like
The angle $\theta$ (rad).
- phiarray_like
The angle $\phi$ (rad).
- axisint
The axis along which the vector components are aligned.
- Returns:
-
- e_rndarray
The unit vector $\hat{e}_r$.