Field data inversion (“Koenigsee”)

This minimalistic example shows how the Refraction Manager can be used to invert a field data set. Here, we consider the Koenigsee data set, which represents classical refraction seismics data set with slightly heterogeneous overburden and some high-velocity bedrock. The data file can be found in the pyGIMLi example data repository.


We import pyGIMLi and the refraction manager.

import pygimli as pg
from pygimli.physics import TravelTimeManager

The helper function pg.getExampleFile downloads the data set and saves it into a temporary location.

data = pg.getExampleFile("traveltime/koenigsee.sgt", load=True, verbose=True)

Out:

/tmp/gimli-org/example-data/traveltime/koenigsee.sgt

We initialize the refraction manager.

Let’s have a look at the data in the form of traveltime curves and apparent velocity images.

mgr.showData(data)  # show first arrivals as curves (done later with response)
#TODO mgr.showVA(data)  # show data as apparent velocity image
plot 04 koenigsee

Out:

(<matplotlib.image.AxesImage object at 0x7f28e19d2b00>, <matplotlib.colorbar.Colorbar object at 0x7f292559feb8>)

Finally, we call the invert method and plot the result.The mesh is created based on the sensor positions on-the-fly. Yes, it is really as simple as that.

mgr.invert(data, secNodes=3, paraMaxCellSize=5.0,
           zWeight=0.2, vTop=500, vBottom=5000,
           verbose=1)
ax, cbar = mgr.showResult()
mgr.showRayPaths(ax=ax, color="w", lw=0.3, alpha=0.5)
plot 04 koenigsee

Out:

fop: <pygimli.physics.traveltime.TravelTimeManager.TravelTimeDijkstraModelling object at 0x7f291e88f880>
Data transformation: <pygimli.core._pygimli_.RTrans object at 0x7f291e88ff80>
Model transformation (cumulative):
         0 <pygimli.core._pygimli_.RTransLogLU object at 0x7f28e1b2b8f0>
min/max (data): 3.5e-04/0.029
min/max (error): 3.0%/3.0%
min/max (start model): 2.0e-04/0.002
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
inv.iter 2 ... chi² = 9.46 (dPhi = 31.59%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 3 ... chi² = 7.72 (dPhi = 17.98%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 4 ... chi² = 6.8 (dPhi = 11.51%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 5 ... chi² = 5.8 (dPhi = 14.08%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 6 ... chi² = 5.12 (dPhi = 11.01%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 7 ... chi² = 4.63 (dPhi = 8.95%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 8 ... chi² = 4.36 (dPhi = 5.26%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 9 ... chi² = 4.08 (dPhi = 5.59%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 10 ... chi² = 3.91 (dPhi = 3.9%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 11 ... chi² = 3.81 (dPhi = 2.15%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 12 ... chi² = 3.71 (dPhi = 2.3%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 13 ... chi² = 3.66 (dPhi = 1.14%) lam: 20.0
################################################################################
#                 Abort criteria reached: dPhi = 1.14 (< 2.0%)                 #
################################################################################
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/cbook/__init__.py", line 196, in process
    func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colorbar.py", line 1241, in on_mappable_changed
    self.update_normal(mappable)
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colorbar.py", line 1288, in update_normal
    self.draw_all()
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colorbar.py", line 529, in draw_all
    self._process_values()
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colorbar.py", line 974, in _process_values
    b = self.norm.inverse(self._uniform_y(self.cmap.N + 1))
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colors.py", line 1184, in inverse
    self._check_vmin_vmax()
  File "/usr/local/lib/python3.7/dist-packages/matplotlib/colors.py", line 1145, in _check_vmin_vmax
    raise ValueError("minvalue must be positive")
ValueError: minvalue must be positive

(<matplotlib.axes._subplots.AxesSubplot object at 0x7f28e1de0f60>, <matplotlib.colorbar.Colorbar object at 0x7f28e19dca20>)

Show result and fit of measured data and model response.

plot 04 koenigsee

Out:

<Figure size 640x480 with 6 Axes>

You can play around with the gradient starting model (vtop and vbottom arguments) and the regularization strength lam. You can also customize the mesh.

Total running time of the script: ( 0 minutes 29.378 seconds)

Gallery generated by Sphinx-Gallery