gimli-org / gimli

Geophysical Inversion and Modeling Library :earth_africa:
https://www.pygimli.org
Other
365 stars 133 forks source link

Syntetic Data ERT #592

Closed tonapawilliam closed 11 months ago

tonapawilliam commented 11 months ago

Excuse Me Sir, I try to make a syntentic model in ERT which that model has 3 Layer and in Second Layer, I put a Some Anomaly, just like in the picture. Figure_1 When I try simulate that model in ERT and do inversion, that model doesn't have the indication of the anomaly. Maybe, is there any paramater that I have to put or something? Thankyou very much. Figure_10 Figure_13

import numpy as np
import pygimli as pg
from pygimli.physics import ert
import pygimli.meshtools as mt
from pygimli.physics.ert.importData import importRes2dInv
from pygimli.physics.ert.importData import importAsciiColumns

layers = mt.createWorld(start = [0,0], end = [345, -70], layers = [-50, -10])
anomaly1 =  mt.createCircle(pos=[50, -30], radius = 10, area= 10, marker=4)
anomaly2 =  mt.createCircle(pos=[100, -30], radius = 10,area= 10 ,marker=5)
anomaly3 =  mt.createCircle(pos=[150, -30], radius = 7,area= 10 ,marker=6)
anomaly4 =  mt.createCircle(pos=[200, -30], radius = 7,area= 10, marker=7)
anomaly5 =  mt.createCircle(pos=[250, -30], radius = 7,area= 10, marker=8)
anomaly6 =  mt.createCircle(pos=[300, -30], radius = 7,area= 10, marker=9)

model = layers + anomaly1 + anomaly2 +anomaly3 + anomaly4 + anomaly5+anomaly6
pg.show(model)

scheme = ert.createData(elecs=np.linspace(start=0, stop=345, num=140), schemeName ='gr')
mesh = mt.createMesh(model, quality = 34)

rhomap = [[1, 100], #limonate
          [2, 90],#limonite ore
          [3, 50], #Bedrock
          [4, 1000], #Boulder
          [5, 1000], #Boulder
          [6, 1000], #Boulder
          [7, 1000], #Boulder
          [8, 1000], #Boulder
          [9, 1000]] #Boulder
pg.show(mesh, data=rhomap, showMesh=True)

data = ert.simulate(mesh, scheme=scheme, res=rhomap, noiseLevel=1,
                    noiseAbs=1e-6, seed=1337)
data ['k'] =  ert.createGeometricFactors(data, numerical=True)
data ['err'] = ert.estimateError(data, absoluteError=0.1, relativeError=0.1)
ert.show(data)

data.save('NO3_Syntentik.dat')
mgr =  ert.ERTManager(data, verbose = True)
inv = inv =  mgr.invert(data, lam=20, verbose=True, paraDX=1, paraDepth=67, quality = 33.6)
mgr.showResultAndFit()

mgr.saveResult( )
halbmy commented 11 months ago

Just a quick comment: ert.simulate already computes the geometric factor (analytically, not numerically) and does the error estimation before generating the noise, so it is unnecessary and even wrong to estimate the error by hand. A noise level of 0.01 means 1%.

Second, however, is that your electrodes are running along the whole upper boundary. You should increase the size of the model to improve the boundary condition effect.

Main point, however, is that your electrodes are no nodes in the mesh. Anyway your electrode spacing of 2.48201 is a bit weird. Doing so you obtain a resonable model image

tonapawilliam commented 11 months ago

Thank You Sir

halbmy commented 10 months ago

https://github.com/gimli-org/notebooks/blob/main/issues/592/issue592.ipynb