Event Volume Plotting#

This example shows how to visualise microseismic event characteristics, i.e., semblance or imaging functions as a volume.

import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage import gaussian_filter
from fracspy.visualisation.eventimages import locimage3d
from fracspy.location.utils import get_max_locs

Setting up model#

# Define subsurface
nx, ny, nz = 60, 65, 75
dx = dy = dz = 5
x = np.arange(0,nx)*dx
y = np.arange(0,ny)*dy
z = np.arange(0,nz)*dz

source_location = 25, 30, 50  # x,y,z location

Simple Example#

In this example we have a noisy background but the coherent energy, and the image maxima correspond to our source location

Perform plotting, here we are going to intersect the volume at the known source location. We also provide the limits for the model space using the xlim, ylim, and zlim parameters.

fig, axs = locimage3d(microseismic_image,
                      x0=int(np.round(source_location[0])),
                      y0=int(np.round(source_location[1])),
                      z0=int(np.round(source_location[2])),
                      xlim=[x[0],x[-1]],
                      ylim=[y[0],y[-1]],
                      zlim=[z[0],z[-1]],
                      clipval=[0,1])
plt.tight_layout()
plot EventImages
/home/runner/work/FraCSPy/FraCSPy/fracspy/visualisation/eventimages.py:99: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  fig.tight_layout()
/home/runner/work/FraCSPy/FraCSPy/examples/plot_EventImages.py:58: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()

Noisy Example - Artifact present in image#

If we perform slicing at the location of the maxima of the image volume we will now be slicing over the artifact location, as opposed to the true source location

max_loc, _ = get_max_locs(microseismic_image_noisy, n_max=5)

fig, axs = locimage3d(microseismic_image_noisy,
                      x0=int(np.round(max_loc[0])),
                      y0=int(np.round(max_loc[1])),
                      z0=int(np.round(max_loc[2])),
                      xlim=[x[0],x[-1]],
                      ylim=[y[0],y[-1]],
                      zlim=[z[0],z[-1]],
                      clipval=[0,1])
plt.tight_layout()
plot EventImages
/home/runner/work/FraCSPy/FraCSPy/examples/plot_EventImages.py:87: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()

In this instance, it may be preferable to add an additional cross to the plot to highlight where we believe the source location is, in comparison to the maxima for the image volume.

Note, that the source location is not the location for the plane intersection the second cross is merely a projection of the expected location, on top of the intersection.

fig, axs = locimage3d(microseismic_image_noisy,
                      x0=int(np.round(max_loc[0])),
                      y0=int(np.round(max_loc[1])),
                      z0=int(np.round(max_loc[2])),
                      xlim=[x[0],x[-1]],
                      ylim=[y[0],y[-1]],
                      zlim=[z[0],z[-1]],
                      secondcrossloc=source_location,
                      clipval=[0,1])
plt.tight_layout()
plot EventImages
/home/runner/work/FraCSPy/FraCSPy/examples/plot_EventImages.py:109: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()

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

Gallery generated by Sphinx-Gallery