Dieter Werthmüller
Dieter Werthmüller
Hi @leonfoks, just my 2 cents, @sgkang might correct me if I remember it wrong. This issue was opened when we improved the speed through improving the implementation of the...
Not sure if I understand @sgkang , so you still think there are modifications required in empymod (and if so, please expand a bit), or is it something you have...
> the residual method of simulations should always return real values. No, not if you have complex data, then the residual is still complex.
I see what you mean. If the residual would return `absolute_residual=abs(complex_residual)`, `np.vdot(absolute_residual, absolute_residual)` would yield the same as with complex residuals with `np.vdot(complex_residual, complex_residual).real`. I guess indeed that can be...
(However and again, slapping a `.real` onto the `vdot` here will not have any negative side effects and would it make work with real and complex valued residuals...)
> Do you recall which simulations where returning complex values? I use the `BaseFDEMSimulation`. But it comes basically from the `BaseSimulation`, https://github.com/simpeg/simpeg/blob/5e4b583be3e5dafa3622dcff59894a2a02e5a304/simpeg/simulation.py#L435-L461 -> this returns a complex valued residual if...
> Nonetheless, if the simulations would return complex arrays, keeping just the real part when computing the residual wouldn't throw away all the misfits in the imaginary parts? Is this...
The problem is only coming due to the use of `vdot`. As noted in the comment of the code changes, we could equally well use the square of the L2-norm,...
> Should we support simulations with complex data? AFAIK, that is a decision long made, as it is implemented for EM1D. See, e.g., https://github.com/simpeg/simpeg/blob/5e4b583be3e5dafa3622dcff59894a2a02e5a304/simpeg/electromagnetics/frequency_domain/receivers.py#L15-L17 And the data container permits complex...
bumping this one...?