SimPEG.maps.Wires#

class SimPEG.maps.Wires(*args)[source]#

Bases: object

Mapping class for organizing multiple parameter types into a single model.

Let \(\mathbf{p_1}\) and \(\mathbf{p_2}\) be vectors that contain the parameter values for two different parameter types; for example, electrical conductivity and magnetic permeability. Here, all parameters are organized into a single model \(\mathbf{m}\) of the form:

\[\begin{split}\mathbf{m} = \begin{bmatrix} \mathbf{p_1} \\ \mathbf{p_2} \end{bmatrix}\end{split}\]

The Wires class constructs and applies the basic projection mappings for extracting the values of a particular parameter type from the model. For example:

\[\mathbf{p_1} = \mathbf{P_{\! 1} m}\]

where \(\mathbf{P_1}\) is the projection matrix that extracts parameters \(\mathbf{p_1}\) from the complete set of model parameters \(\mathbf{m}\). Likewise, there is a projection matrix for extracting \(\mathbf{p_2}\). This can be extended to a model that containing more than 2 parameter types.

Parameters
argstuple

Each input argument is a tuple (str, int) that provides the name and number of parameters for a given parameters type.

Examples

Here we construct a wire mapping for a model where there are two parameters types. Note that the number of parameters of each type does not need to be the same.

>>> from SimPEG.maps import Wires, ReciprocalMap
>>> import numpy as np
>>> p1 = np.r_[4.5, 2.7, 6.9, 7.1, 1.2]
>>> p2 = np.r_[10., 2., 5.]**-1
>>> nP1 = len(p1)
>>> nP2 = len(p2)
>>> m = np.r_[p1, p2]
>>> m
array([4.5, 2.7, 6.9, 7.1, 1.2, 0.1, 0.5, 0.2])

Here we construct the wire map. The user provides a name and the number of parameters for each type. The name provided becomes the name of the method for constructing the projection mapping.

>>> wire_map = Wires(('name_1', nP1), ('name_2', nP2))

Here, we extract the values for the first parameter type.

>>> wire_map.name_1 * m
array([4.5, 2.7, 6.9, 7.1, 1.2])

And here, we extract the values for the second parameter type then apply a reciprocal mapping.

>>> reciprocal_map = ReciprocalMap()
>>> reciprocal_map * wire_map.name_2 * m
array([10.,  2.,  5.])

Attributes

nP

Number of parameters the mapping acts on.

Galleries and Tutorials using SimPEG.maps.Wires#

Maps: ComboMaps

Maps: ComboMaps

Maps: ComboMaps
Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh
Petrophysically guided inversion: Joint linear example with nonlinear relationships

Petrophysically guided inversion: Joint linear example with nonlinear relationships

Petrophysically guided inversion: Joint linear example with nonlinear relationships
Tensor Meshes

Tensor Meshes

Tensor Meshes
Cylindrical Meshes

Cylindrical Meshes

Cylindrical Meshes
Tree Meshes

Tree Meshes

Tree Meshes
Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information
Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information
Parametric 1D Inversion of Sounding Data

Parametric 1D Inversion of Sounding Data

Parametric 1D Inversion of Sounding Data
Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data