simpeg.maps.ComboMap.deriv#

ComboMap.deriv(m, v=None)[source]#

Derivative of the mapping with respect to the input parameters.

Any time that you create your own combination mapping, be sure to test that the derivative is correct.

Parameters:
m(nP) numpy.ndarray

A vector representing a set of model parameters

v(nP) numpy.ndarray

If not None, the method returns the derivative times the vector v

Returns:
scipy.sparse.csr_matrix

Derivative of the mapping with respect to the model parameters. If the input argument v is not None, the method returns the derivative times the vector v.

Notes

Let m be a set of model parameters and let [fn,...,f1] be the list of SimPEG mappings joined to create a combination mapping. Recall that the list of mappings is ordered from last applied to first applied.

Where the combination mapping acting on the model parameters can be expressed as:

u(m)=fn(fn1(f1(f0(m))))

The deriv method returns the derivative of u with respect to the model parameters. To do this, we use the chain rule, i.e.:

um=fnfn1f2f1f1m