simpeg.data_misfit.BaseDataMisfit.residual#

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

Computes the data residual vector for a given model.

Where dobs is the observed data vector and dpred is the predicted data vector for a model vector m, this function computes the data residual:

r=dpreddobs
Parameters:
m(n_param, ) numpy.ndarray

The model for which the function is evaluated.

fNone or simpeg.fields.Fields, optional

A SimPEG fields object. Used when the fields for the model m have already been computed.

Returns:
(n_data, ) numpy.ndarray

The data residual vector.