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 0x7effc9077860>, <matplotlib.colorbar.Colorbar object at 0x7effc926c5f8>)

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 0x7effb050aa40>
Data transformation: <pygimli.core._pygimli_.RTrans object at 0x7effbb65a500>
Model transformation (cumulative):
         0 <pygimli.core._pygimli_.RTransLogLU object at 0x7effbb58b0d0>
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.45 (dPhi = 31.7%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 3 ... chi² = 8.01 (dPhi = 14.86%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 4 ... chi² = 6.82 (dPhi = 14.46%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 5 ... chi² = 5.8 (dPhi = 14.29%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 6 ... chi² = 5.41 (dPhi = 6.28%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 7 ... chi² = 5.11 (dPhi = 5.12%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 8 ... chi² = 4.79 (dPhi = 5.82%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 9 ... chi² = 4.36 (dPhi = 8.15%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 10 ... chi² = 4.14 (dPhi = 4.7%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 11 ... chi² = 3.96 (dPhi = 3.76%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 12 ... chi² = 3.87 (dPhi = 2.04%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 13 ... chi² = 3.75 (dPhi = 2.21%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 14 ... chi² = 3.63 (dPhi = 2.91%) lam: 20.0
--------------------------------------------------------------------------------
inv.iter 15 ... chi² = 3.57 (dPhi = 1.49%) lam: 20.0
################################################################################
#                 Abort criteria reached: dPhi = 1.49 (< 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 0x7effb8527b38>, <matplotlib.colorbar.Colorbar object at 0x7effc937b4e0>)

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 33.231 seconds)

Gallery generated by Sphinx-Gallery