Exemple #1
0
# We initialize the refraction manager.
mgr = TravelTimeManager()

# Alternatively, one can plot a matrix plot of apparent velocities which is the
# more general function also making sense for crosshole data.
ax, cbar = mgr.showData(data)

################################################################################
# Finally, we call the `invert` method and plot the result.The mesh is created
# based on the sensor positions on-the-fly.

mgr.invert(data,
           secNodes=3,
           paraMaxCellSize=5.0,
           zWeight=0.2,
           vTop=500,
           vBottom=5000,
           verbose=1)

ax, cbar = mgr.showResult(logScale=True)
mgr.drawRayPaths(ax=ax, color="w", lw=0.3, alpha=0.5)

################################################################################
# Show result and fit of measured data and model response. You may want to save your results too.
fig = mgr.showResultAndFit()
mgr.saveResult()
################################################################################
# You can play around with the gradient starting model (`vTop` and `vBottom`
# arguments) and the regularization strength `lam`. You can also customize the
# mesh.
                  maxIter=10,
                  verbose=True)
np.testing.assert_array_less(mgr.inv.inv.chi2(), 1.1)

###############################################################################
# The manager also holds the method showResult that is used to plot the result.
# Note that only covered cells are shown by default.
# For comparison we plot the geometry on top.

ax, _ = mgr.showResult(cMin=min(vp), cMax=max(vp), logScale=False)
pg.show(geom, ax=ax, fillRegion=False, regionMarker=False)

###############################################################################
# Note that internally the following is called
#
# .. code-block:: python
#
#    ax, _ = pg.show(ra.mesh, vest, label="Velocity [m/s]", **kwargs)
#

###############################################################################
# Another useful method is to show the model along with its response
# on the data.
mgr.showResultAndFit(cMin=min(vp), cMax=max(vp))

###############################################################################
# .. note:: Takeaway message

#     A default data inversion with checking of the data consists of only few
#     lines. Check out :ref:`ex:koenigsee`.
Exemple #3
0
mgr = TravelTimeManager()

################################################################################
# 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

################################################################################
# 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)

################################################################################
# Show result and fit of measured data and model response.
mgr.showResultAndFit()

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