Beispiel #1
0
One way to plot seismic data is using black and white wiggles.
Function :func:`fatiando.vis.mpl.seismic_wiggle` does exactly this.

"""
import numpy as np
import matplotlib.pyplot as plt
from fatiando.seismic import conv
from fatiando.vis.mpl import seismic_wiggle

# We need some data to plot, so let's generate some using the convolution model
# in fatiando.seismic.conv
n_samples, n_traces = 400, 20
dt = 2e-3  # the sampling interval
velocity = 1500 * np.ones((n_samples, n_traces))
# Our model will have a different velocity layer in the middle. This will cause
# a reflection on the top and one on the bottom (with reversed polarity).
velocity[150:300, :] = 2500
# For simplicity, we'll assume constant density when calculating the
# reflectivity.
rc = conv.reflectivity(velocity, 2000 * np.ones_like(velocity))
data = conv.convolutional_model(rc, f=30, wavelet=conv.rickerwave, dt=dt)

# Plot the data using wiggles
plt.figure(figsize=(6, 5))
plt.title("Seismic wiggles")
# The scale parameter makes the wiggles larger or smaller
seismic_wiggle(data, dt=dt, scale=3, color='k')
plt.ylabel('time (s)')
plt.xlabel('trace')
plt.show()
from fatiando.vis import mpl

# Define the parameters of our depth model
n_samples, n_traces = [600, 100]
velocity = 1500*np.ones((n_samples, n_traces))
# We'll put two interfaces in depth
velocity[150:, :] = 2000
velocity[400:, :] = 3500
dt = 2e-3

# We need to convert the depth model we made above into time
vel_l = conv.depth_2_time(velocity, velocity, dt=dt, dz=1)
# and we'll assume the density is homogeneous
rho_l = 2200*np.ones(np.shape(vel_l))
# With that, we can calculate the reflectivity model in time
rc = conv.reflectivity(vel_l, rho_l)
# and finally perform our convolution
synt = conv.convolutional_model(rc, 30, conv.rickerwave, dt=dt)

# We can use the utility function in fatiando.vis.mpl to plot the seismogram
fig, axes = plt.subplots(1, 2, figsize=(8, 5))

ax = axes[0]
ax.set_title("Velocity model (in depth)")
tmp = ax.imshow(velocity, extent=[0, n_traces, n_samples, 0],
                cmap="copper", aspect='auto', origin='upper')
fig.colorbar(tmp, ax=ax, pad=0, aspect=50)
ax.set_xlabel('Trace')
ax.set_ylabel('Depth (m)')

ax = axes[1]
from fatiando.seismic import conv
from fatiando.vis import mpl

# Define the parameters of our depth model
n_samples, n_traces = [600, 100]
velocity = 1500 * np.ones((n_samples, n_traces))
# We'll put two interfaces in depth
velocity[150:, :] = 2000
velocity[400:, :] = 3500

# We need to convert the depth model we made above into time
vel_l = conv.depth_2_time(velocity, velocity, dt=2e-3, dz=1)
# and we'll assume the density is homogeneous
rho_l = 2200 * np.ones(np.shape(vel_l))
# With that, we can calculate the reflectivity model in time
rc = conv.reflectivity(vel_l, rho_l)
# and finally perform our convolution
synt = conv.convolutional_model(rc, 30, conv.rickerwave, dt=2e-3)

# We can use the utility function in fatiando.vis.mpl to plot the seismogram
fig, axes = plt.subplots(1, 2, figsize=(8, 5))

ax = axes[0]
ax.set_title("Velocity model (in depth)")
tmp = ax.imshow(velocity,
                extent=[0, n_traces, n_samples, 0],
                cmap="copper",
                aspect='auto',
                origin='upper')
fig.colorbar(tmp, ax=ax, pad=0, aspect=50)
ax.set_xlabel('Trace')
Beispiel #4
0
One way to plot seismic data is using black and white wiggles.
Function :func:`fatiando.vis.mpl.seismic_wiggle` does exactly this.

"""
import numpy as np
import matplotlib.pyplot as plt
from fatiando.seismic import conv
from fatiando.vis.mpl import seismic_wiggle

# We need some data to plot, so let's generate some using the convolution model
# in fatiando.seismic.conv
n_samples, n_traces = 400, 20
dt = 2e-3    # the sampling interval
velocity = 1500*np.ones((n_samples, n_traces))
# Our model will have a different velocity layer in the middle. This will cause
# a reflection on the top and one on the bottom (with reversed polarity).
velocity[150:300, :] = 2500
# For simplicity, we'll assume constant density when calculating the
# reflectivity.
rc = conv.reflectivity(velocity, 2000*np.ones_like(velocity))
data = conv.convolutional_model(rc, f=30, wavelet=conv.rickerwave, dt=dt)

# Plot the data using wiggles
plt.figure(figsize=(6, 5))
plt.title("Seismic wiggles")
# The scale parameter makes the wiggles larger or smaller
seismic_wiggle(data, dt=dt, scale=3, color='k')
plt.ylabel('time (s)')
plt.xlabel('trace')
plt.show()