Open liutingli opened 6 days ago
Some of your data are near-zero. If you consider a relative error transformed into an absolute one
absError = 0.002 * np.abs(data)
the minimum of this vector becomes practically zero (1e-27) and this makes the inversion crash. I strongly suggest adding a fixed absolute error (e.g. magnetometer resolution) and expect this to resolve the issue.
Thank you very much, sir! I have tried to add a fixed absolute error before, but it doesn't work. I want to know if there is a problem with my initial grid settings in the inversion function: inv = pg.Inversion(fop=fop, verbose=True, stopAtChi1=True).
No, that's ok.
I am pretty sure the error message is different if adding an absolute value to the error.
Problem description
Your environment
Python 3.11.10 | packaged by conda-forge | (main, Sep 22 2024, 14:00:36) [MSC v.1941 64 bit (AMD64)] pygimli : 1.5.2 pgcore : 1.5.0 numpy : 1.26.4 matplotlib : 3.9.2 scipy : 1.14.1 tqdm : 4.66.5 pyvista : 0.44.1
Steps to reproduce
magnetic_inversion.zip