Add a class that implements Euler Inversion for source location#660
Add a class that implements Euler Inversion for source location#660
Conversation
Allows fixed SI or estimates it. Missing docs still.
|
TODO:
|
|
The coverage is not 100% because the test for Euler Inversion is too easy and the initial solution is already too close to the truth so the main loop doesn't execute. Gonna need a different test that the deconvolution fails. |
Gives it a bigger challenge and makes sure the initial solution isn't already good enough.
|
@santisoler @mdtanker finished this implementation. It's still for a single window but it's the building blocks for windowed version to come later on. Any thoughts? |
santisoler
left a comment
There was a problem hiding this comment.
It looks great, @leouieda! I just left a few minor suggestions to the docs.
Since we have this admonition that tell users that a structural_index of zero is not yet supported, shouldn't we raise an error if the user passes such value to the EulerDeconvolution and the EulerInversion? Also, wouldn't it make sense to also check if it's an integer between 1 and 3? Or do we prefer to leave the possibility to pass greater integers or even floats to it?
Co-authored-by: Santiago Soler <santisoler@fastmail.com>
We should. Good check! Otherwise the error is gonna come from a singular matrix in the inverse calculation which is not obvious.
Not really since it's fine if it's a float like 1.0. It's not gonna cause an error for people to pass fractional values like 1.5 but it's just not physically meaningful. The range of 1-3 is also not fixed and can vary depending on the potential field used. Magnetic gradients for example will probably correspond to SI=4 for dipoles (didn't check the math but I think that's what it would come out to). I made some changes to allow users to pass in the sequence of values we test instead of hard coding that. |
|
@santisoler done! |
The
EulerInversionclass implements the method, which is much less sensitive to noise in the data and interfering sources. It can estimate the integer structural index as well, though a known value can also be given. The class only implements fitting data in a single window (moving window approaches will come later). The initial estimate for the non-linear process is the Euler Deconvolution result.