simpeg.electromagnetics.static.self_potential.CurrentDensityMap.dot#

CurrentDensityMap.dot(map1)[source]#

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

Let \(\mathbf{f}_1\) and \(\mathbf{f}_2\) represent two mapping functions. Where \(\mathbf{m}\) represents a set of input model parameters, the dot method is used to create a combination mapping:

\[u(\mathbf{m}) = f_2(f_1(\mathbf{m}))\]

Where \(\mathbf{f_1} : M \rightarrow K_1\) and acts on the model first, and \(\mathbf{f_2} : K_1 \rightarrow K_2\), the combination mapping \(\mathbf{u} : M \rightarrow K_2\).

When using the dot method, the input argument map1 represents the first mapping that is be applied and self represents the second mapping that is be applied. Therefore, the correct syntax for using this method is:

self.dot(map1)
Parameters:
map1

A SimPEG mapping object.

Examples

Here we create a combination mapping that 1) projects a single scalar to a vector space of length 5, then takes the natural exponent.

>>> import numpy as np
>>> from simpeg.maps import ExpMap, Projection
>>> nP1 = 1
>>> nP2 = 5
>>> ind = np.zeros(nP1, dtype=int)
>>> projection_map = Projection(nP1, ind)
>>> projection_map.shape
(5, 1)
>>> exp_map = ExpMap(nP=5)
>>> exp_map.shape
(5, 5)
>>> combo_map = exp_map.dot(projection_map)
>>> combo_map.shape
(5, 1)
>>> m = np.array([2])
>>> combo_map * m
array([7.3890561, 7.3890561, 7.3890561, 7.3890561, 7.3890561])