Synthetic example

This synthetic case follows the paper of Günther & Martin (2016) using a Cole-Cole model. A slag heap consists of two different bodies with different time constants.

import numpy as np
from fdip import FDIP
import pygimli as pg
from pygimli.physics import ert
import pygimli.meshtools as mt

data = ert.createData(41, "dd")
print(data)
02/07/26 - 17:47:07 - pyGIMLi - INFO - Cache c:\src\ERT\TDIP\.venv\Lib\site-packages\pygimli\physics\ert\ert.py:createGeometricFactors restored (0.0s x 1): C:\Users\Thomas Guenther\AppData\Roaming\pygimli\Cache\4851767410368674125

Data: Sensors: 41 data: 741, nonzero entries: ['a', 'b', 'k', 'm', 'n', 'valid']

poly = mt.createParaMeshPLC(data, paraDX=0.2, paraDepth=8,
                            paraBoundary=10, boundary=0.3)
topsoil = [[-10, -1], [25, -1], [30, 0], [-10, 0]]
poly += mt.createPolygon(topsoil, isClosed=True, marker=3)
slag1 = [[5, -1], [5, -4], [20, -4], [20, -1]]
poly += mt.createPolygon(slag1, isClosed=True, marker=4)
slag2 = [[20, -4], [25, -4], [45, 0], [30, 0], [25, -1], [20, -1]]
poly += mt.createPolygon(slag2, isClosed=True, marker=5)
poly.show();
No description has been provided for this image
mesh = mt.createMesh(poly)
mesh.show(markers=True, showMesh=True);
No description has been provided for this image
frvec = [0.156, 0.312, 0.625, 1.25, 2.5, 5, 10, 20, 40, 80, 125,
         250, 500, 1000]
pro = FDIP(data=data, f=frvec)
pro.simulate(mesh,
             rhovec=np.array([200, 200, 500., 100., 200., 200.]),
             mvec=np.array([1e-3, 1e-3, 1e-3, 1e-3, 0.1, 1.0]),
             tauvec=np.array([0, 0, 1e-5, 1e-5, 0.8, 0.7]),
             cvec=np.array([0, 0, 0.25, 0.25, 0.5, 0.5]));
02/07/26 - 18:10:53 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:53 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:54 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:54 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:54 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:55 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:55 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:55 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:55 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:56 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:56 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:56 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:57 - pyGIMLi - INFO - Complex resistivity values found.
02/07/26 - 18:10:57 - pyGIMLi - INFO - Complex resistivity values found.

pro.showSingleFrequencyData(5);
No description has been provided for this image
# pro.createERTManager()#paraDepth=13)
pro.singleInversion()
02/07/26 - 18:10:58 - pyGIMLi - INFO - Use median(data values)=197.0862466034703



WARNING! found negative phases .. taking abs of ip data.

ax = pro.showSingleResult()
ply = mt.createPolygon(slag1, isClosed=True) + mt.createPolygon(slag2, isClosed=True)
for a in ax: ply.show(ax=a, fillRegion=False, fitView=False)
No description has been provided for this image
pro.simultaneousInversion()
02/07/26 - 18:11:13 - pyGIMLi - INFO - Found 2 regions.
02/07/26 - 18:11:13 - pyGIMLi - INFO - Region with smallest marker set to background (marker=1)
02/07/26 - 18:11:13 - pyGIMLi - INFO - Creating forward mesh from region infos.

02/07/26 - 18:11:13 - pyGIMLi - INFO - Creating refined mesh (H2) to solve forward task.
02/07/26 - 18:11:13 - pyGIMLi - INFO - Mesh for forward task: Mesh: Nodes: 3056 Cells: 5852 Boundaries: 4518
02/07/26 - 18:11:14 - pyGIMLi - INFO - Starting inversion.
02/07/26 - 18:11:14 - pyGIMLi - INFO - fop: <pygimli.frameworks.timelapse.MultiFrameModelling object at 0x000001389487D170>
02/07/26 - 18:11:14 - pyGIMLi - INFO - Data transformation: Identity transform
02/07/26 - 18:11:14 - pyGIMLi - INFO - Model transformation: Logarithmic transform
02/07/26 - 18:11:14 - pyGIMLi - INFO - min/max (data): 2.13/447
02/07/26 - 18:11:14 - pyGIMLi - INFO - min/max (error): 3.02%/53.71%
02/07/26 - 18:11:14 - pyGIMLi - INFO - min/max (start model): 108/108

947 model cells
--------------------------------------------------------------------------------

02/07/26 - 18:11:25 - pyGIMLi - INFO - inv.iter 0 ... chi² = 22688.74

--------------------------------------------------------------------------------
inv.iter 1 ... 
02/07/26 - 18:11:34 - pyGIMLi - INFO - chi² = 2662.22 (dPhi = 88.26%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 2 ... 
02/07/26 - 18:11:48 - pyGIMLi - INFO - chi² =  266.57 (dPhi = 89.93%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 3 ... 
02/07/26 - 18:12:11 - pyGIMLi - INFO - chi² =   22.44 (dPhi = 90.95%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 4 ... 
02/07/26 - 18:12:36 - pyGIMLi - INFO - chi² =    1.78 (dPhi = 84.80%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 5 ... 
02/07/26 - 18:12:53 - pyGIMLi - INFO - chi² =    0.47 (dPhi = 35.48%) lam: 20.0
02/07/26 - 18:12:53 - pyGIMLi - INFO - Starting inversion.
02/07/26 - 18:12:53 - pyGIMLi - INFO - fop: <pygimli.frameworks.modelling.LinearModelling object at 0x00000137ED856A20>
02/07/26 - 18:12:53 - pyGIMLi - INFO - Data transformation: Identity transform
02/07/26 - 18:12:53 - pyGIMLi - INFO - Model transformation: Logarithmic transform
02/07/26 - 18:12:53 - pyGIMLi - INFO - min/max (data): 2.6e-04/98.33
02/07/26 - 18:12:53 - pyGIMLi - INFO - min/max (error): 4.02%/1.0e+08%
02/07/26 - 18:12:53 - pyGIMLi - INFO - min/max (start model): 1.15/1.15
02/07/26 - 18:12:53 - pyGIMLi - INFO - inv.iter 0 ... chi² =  160.09



################################################################################
#                  Abort criterion reached: chi² <= 1 (0.47)                   #
################################################################################
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
inv.iter 1 ... 
02/07/26 - 18:12:56 - pyGIMLi - INFO - chi² =   61.35 (dPhi = 61.42%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 2 ... 
02/07/26 - 18:12:59 - pyGIMLi - INFO - chi² =   26.08 (dPhi = 56.90%) lam: 20.0
02/07/26 - 18:13:03 - pyGIMLi - INFO - chi² =    1.18 (dPhi = 92.59%) lam: 20.0

--------------------------------------------------------------------------------
inv.iter 3 ... --------------------------------------------------------------------------------
inv.iter 4 ... 
02/07/26 - 18:13:06 - pyGIMLi - INFO - chi² =    0.51 (dPhi = 28.50%) lam: 20.0



################################################################################
#                  Abort criterion reached: chi² <= 1 (0.51)                   #
################################################################################

pro.fitAllRhoPhi()
pro.showModelSpectra([[12, -3], [23, -3], [30, -2]]);
No description has been provided for this image
ax = pro.showColeColeParameters(rlim=[100, 500], mlim=[0, 1], tlim=[0.03, 3], coverage=1)
for a in ax: ply.show(ax=a, fillRegion=False, fitView=False)
No description has been provided for this image