data_weighting

emg3d.optimize.data_weighting(simulation)[source]

Return weighted residual.

Returns the weighted residual as given in Equation 18 of [PlMu08],

(35)\[W(\textbf{x}_s, \textbf{x}_r, \omega) = \frac{\lVert\textbf{x}_s-\textbf{x}_r\rVert^{\gamma_d}} {\omega^{\beta_f} \lVert E^\text{ref}(\textbf{x}_s, \textbf{x}_r, \omega) \rVert^{\beta_d}}\ .\]
Parameters:
simulation : emg3d.simulations.Simulation

The simulation. The parameters for data weighting are set in the call to Simulation through the parameter data_weight_opts.

Returns:
wresidual : DataArray

The weighted residual (\(W^e \Delta^e\)).