SimPEG.maps.Weighting#
- class SimPEG.maps.Weighting(mesh=None, nP=None, weights=None, **kwargs)[source]#
Bases:
SimPEG.maps.IdentityMap
Mapping that scales the elements of the model by a corresponding set of weights.
Where \(\mathbf{m}\) defines the set of input model parameters and \(\mathbf{w}\) represents a corresponding set of model weight,
Weighting
constructs a mapping \(\mathbf{u}(\mathbf{m})\) of the form:\[\mathbf{u}(\mathbf{m}) = \mathbf{w} \odot \mathbf{m}\]where \(\odot\) is the Hadamard product. The mapping may also be defined using a linear operator as follows:
\[\mathbf{u}(\mathbf{m}) = \mathbf{Pm} \;\;\;\;\; \textrm{where} \;\;\;\;\; \mathbf{P} = diag(\mathbf{w})\]- Parameters
- mesh
discretize.BaseMesh
The number of parameters accepted by the mapping is set to equal the number of mesh cells.
- nP
int
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.
- weights(
nP
)numpy.ndarray
A set of independent model weights. If
None
, all model weights are set to 1.
- mesh
Attributes
The linear mapping operator
Dimensions of the mapping.
Methods
deriv
(m[, v])Derivative of mapping with respect to the input parameters.
inverse
(D)Apply the inverse of the weighting mapping to an array.