simpeg.electromagnetics.natural_source.Simulation2DElectricField.getJtJdiag#

Simulation2DElectricField.getJtJdiag(m, W=None, f=None)[source]#

Return the diagonal of JTJ.

Where d are the data and m are the model parameters, the sensitivity matrix J is defined as:

J=dm

This method returns the diagonals of JTJ. When the W input argument is used to include a diagonal weighting matrix W, this method returns the diagonal of WTJTJW.

Parameters:
m(n_param,) numpy.ndarray

The model parameters.

W(n_param, n_param) scipy.sparse.csr_matrix

A diagonal weighting matrix.

ffrequency_domain.fields.FieldsFDEM, optional

Fields solved for all sources.

Returns:
(n_param,) numpy.ndarray

The diagonals.