Skip to content

Temporarily use Euler-derived location instead of NonlinearMagneticDipoleBz location estimates#121

Merged
YagoMCastro merged 1 commit intomainfrom
euler-iterative-inversion
Oct 17, 2025
Merged

Temporarily use Euler-derived location instead of NonlinearMagneticDipoleBz location estimates#121
YagoMCastro merged 1 commit intomainfrom
euler-iterative-inversion

Conversation

@YagoMCastro
Copy link
Contributor

@YagoMCastro YagoMCastro commented Oct 17, 2025

This PR temporarily replaces the source location estimated by the NonlinearMagneticDipoleBz inversion with the one obtained from Euler Deconvolution.

Recent tests show that the Euler-derived locations produce more accurate and consistent results, while the positions estimated by NonlinearMagneticDipoleBz sometimes exhibit instability or unrealistic values.

This suggests there may be a bug in the nonlinear inversion algorithm.

@YagoMCastro YagoMCastro merged commit 6ca0ac0 into main Oct 17, 2025
12 checks passed
@YagoMCastro YagoMCastro deleted the euler-iterative-inversion branch October 17, 2025 18:33
YagoMCastro added a commit that referenced this pull request Nov 11, 2025
This PR restores the use of source locations estimated by
`NonlinearMagneticDipoleBz`, replacing the temporary use of Euler
Deconvolution results.

The inversion algorithm was corrected to fix the inaccurate location
estimates previously produced.
After the fix, `NonlinearMagneticDipoleBz` now provides accurate and
consistent positions, better than those from Euler Deconvolution.

This update affects the `iterative_nonlinear_inversion` function, which
implements the full methodology presented by [Souza-Junior
(2025)](https://eartharxiv.org/repository/view/8869/).

In our implementation, the original Nelder–Mead–based inversion from the
paper is replaced by a more robust Levenberg–Marquardt–based inversion

**Changes made**
- **Set a lower limit to `r²`** to avoid excessively large derivatives
when source–data distances become very small.
- **Construct the damping matrix proportional to the diagonal of the
Hessian**, ensuring that regularization adapts to parameter sensitivity.
- **Reduce the global scaling factor** to stabilize updates and prevent
overshooting during optimization.

Together, these changes make the inversion more robust against numerical
instabilities and improve convergence consistency across different
datasets.

**Relevant issues/PRs:**
#121 
#120 
#107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant