Data Misfit¶
The data misfit using an l_2 norm is:
If the field, u, is provided, the calculation of the data is fast:
Where P is a projection matrix that brings the field on the full domain to the data measurement locations; u is the field of interest; d_obs is the observed data; and \(\mathbf{W}_d\) is the weighting matrix.
The derivative of this, with respect to the model, is:
The second derivative is:
The API¶
-
class
SimPEG.data_misfit.
BaseDataMisfit
(*args, **kwargs)[source]¶ BaseDataMisfit
Note
You should inherit from this class to create your own data misfit term.
Required Properties:
data (
Data
): A SimPEG data class containing the observed data, an instance of Datasimulation (
BaseSimulation
): A SimPEG simulation, an instance of BaseSimulation
Optional Properties:
counter (
Counter
): Set this to a SimPEG.utils.Counter() if you want to count things, an instance of Counterdebug (
Boolean
): Print debugging information, a boolean, Default: False
-
property
simulation
¶ simulation (
BaseSimulation
): A SimPEG simulation, an instance of BaseSimulation
-
property
counter
¶ counter (
Counter
): Set this to a SimPEG.utils.Counter() if you want to count things, an instance of Counter
-
property
nP
¶ number of model parameters
-
property
nD
¶ number of data
-
property
shape
¶
-
property
W
¶ The data weighting matrix. The default is based on the norm of the data plus a noise floor. :rtype: scipy.sparse.csr_matrix :return: W
-
property
Wd
¶ W.Wd has been deprecated. See W for documentation
Common Data Misfits¶
l2 norm¶
-
class
SimPEG.data_misfit.
L2DataMisfit
(*args, **kwargs)[source]¶ The data misfit with an l_2 norm:
\[\mu_\text{data} = {1\over 2}\left| \mathbf{W}_d (\mathbf{d}_\text{pred} - \mathbf{d}_\text{obs}) \right|_2^2\]Required Properties:
data (
Data
): A SimPEG data class containing the observed data, an instance of Datasimulation (
BaseSimulation
): A SimPEG simulation, an instance of BaseSimulation
Optional Properties:
counter (
Counter
): Set this to a SimPEG.utils.Counter() if you want to count things, an instance of Counterdebug (
Boolean
): Print debugging information, a boolean, Default: False
-
deriv
(m, f=None)[source]¶ Derivative of the data misfit
\[\mathbf{J}^{ op} \mathbf{W}^{ op} \mathbf{W} (\mathbf{d} - \mathbf{d}^{obs})\]- Parameters
m (numpy.ndarray) – model
f (SimPEG.fields.Fields) – fields object
-
deriv2
(m, v, f=None)[source]¶ - \[\mathbf{J}^{ op} \mathbf{W}^{ op} \mathbf{W} \mathbf{J}\]
- Parameters
m (numpy.ndarray) – model
v (numpy.ndarray) – vector
f (SimPEG.fields.Fields) – fields object