SimPEG.maps.SphericalSystem.inverse#

SphericalSystem.inverse(u)[source]#

Maps vectors in Cartesian coordinates to spherical coordinates.

Let \(\mathbf{v_x}\), \(\mathbf{v_y}\) and \(\mathbf{v_z}\) store the x, y and z components of a set of vectors in Cartesian coordinates such that:

\[\begin{split}\mathbf{u} = \begin{bmatrix} \mathbf{x} \\ \mathbf{y} \\ \mathbf{z} \end{bmatrix}\end{split}\]

The inverse mapping recovers the vectors in spherical coordinates, i.e.:

\[\begin{split}\mathbf{m}(\mathbf{u}) = \begin{bmatrix} \mathbf{a} \\ \mathbf{t} \\ \mathbf{p} \end{bmatrix}\end{split}\]

where \(\mathbf{a}\) are the amplitudes, \(\mathbf{t}\) are the azimuthal angles and \(\mathbf{p}\) are the radial angles.

Parameters
unumpy.ndarray

The x, y and z components of a set of vectors in Cartesian coordinates. If the mapping is defined for a mesh, the numpy.ndarray has length 3*mesh.nC .

Returns
numpy.ndarray

The amplitudes (\(\mathbf{a}\)), azimuthal angles (\(\mathbf{t}\)) and radial angles (\(\mathbf{p}\)) for the set of vectors in spherical coordinates. If the mapping is defined for a mesh, the numpy.ndarray has length 3*mesh.nC .