class SimPEG.maps.SphericalSystem(mesh=None, nP=None, **kwargs)[source]#

Bases: IdentityMap

Mapping vectors from spherical to Cartesian coordinates.

Let \(\mathbf{m}\) be a model containing the amplitudes (\(\mathbf{a}\)), azimuthal angles (\(\mathbf{t}\)) and radial angles (\(\mathbf{p}\)) for a set of vectors in spherical space such that:

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

SphericalSystem constructs a mapping :math:`mathbf{u}(mathbf{m}) that converts the set of vectors in spherical coordinates to their representation in Cartesian coordinates, i.e.:

\[\begin{split}\mathbf{u}(\mathbf{m}) = \begin{bmatrix} \mathbf{v_x} \\ \mathbf{v_y} \\ \mathbf{v_z} \end{bmatrix}\end{split}\]

where \(\mathbf{v_x}\), \(\mathbf{v_y}\) and \(\mathbf{v_z}\) store the x, y and z components of the vectors, respectively.

Using the mesh or nP input arguments, the dimensions of the corresponding mapping operator can be permanently set; i.e. (3*mesh.nC, 3*mesh.nC) or (nP, nP). However if both input arguments mesh and nP are None, the shape of mapping operator is arbitrary and can act on any vector whose length is a multiple of 3; i.e. has shape (*, *).


The number of parameters accepted by the mapping is set to equal 3*mesh.nC .


Set the number of parameters accepted by the mapping directly. Used if the number of parameters is known. Used generally when the number of parameters is not equal to the number of cells in a mesh.


In Cartesian space, the components of each vector are defined as

\[\mathbf{v} = (v_x, v_y, v_z)\]

In spherical coordinates, vectors are is defined as:

\[\mathbf{v^\prime} = (a, t, p)\]


  • \(a\) is the amplitude of the vector

  • \(t\) is the azimuthal angle defined positive from vertical

  • \(p\) is the radial angle defined positive CCW from Easting



Determine whether or not this mapping is a linear operation.


The mesh used for the mapping


Number of parameters the mapping acts on.


Dimensions of the mapping


deriv(m[, v])

Derivative of mapping with respect to the input parameters


Multiply two mappings to create a SimPEG.maps.ComboMap.


Maps vectors in Cartesian coordinates to spherical coordinates.

test([m, num])

Derivative test for the mapping.


Galleries and Tutorials using SimPEG.maps.SphericalSystem#

Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh