simpeg.potential_fields.base.BasePFSimulation.residual#

BasePFSimulation.residual(m, dobs, f=None)[source]#

The data residual.

This method computes and returns the data residual for the model provided. Where \(\mathbf{d}_\text{obs}\) are the observed data values, and \(\mathbf{d}_\text{pred}\) are the predicted data values for model parameters \(\mathbf{m}\), the data residual is given by:

\[\mathbf{r}(\mathbf{m}) = \mathbf{d}_\text{pred} - \mathbf{d}_\text{obs}\]
Parameters:
m(n_param, ) numpy.ndarray

The model parameters.

dobs(n_data, ) numpy.ndarray

The observed data values.

fsimpeg.fields.Fields, optional

If provided, fields will not need to be recomputed when solving the forward problem.

Returns:
(n_data, ) numpy.ndarray

The data residual.