0% found this document useful (0 votes)
4 views

vertopal.com_Untitled-2222

The document outlines a Python script that simulates a seismic reflection series using reflection coefficients and a Ricker wavelet. It generates a time vector, assigns reflection coefficients at specified times, and convolves the reflection series with a zero-phase Ricker wavelet to produce a seismic trace. Finally, it visualizes both the reflection series and the resulting seismic trace using Matplotlib.

Uploaded by

Anurag Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

vertopal.com_Untitled-2222

The document outlines a Python script that simulates a seismic reflection series using reflection coefficients and a Ricker wavelet. It generates a time vector, assigns reflection coefficients at specified times, and convolves the reflection series with a zero-phase Ricker wavelet to produce a seismic trace. Finally, it visualizes both the reflection series and the resulting seismic trace using Matplotlib.

Uploaded by

Anurag Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

import numpy as np

import matplotlib.pyplot as plt


from scipy.signal import ricker, convolve

# Sampling rate and time axis


fs = 1000 # Sampling frequency in Hz
t = np.arange(0, 2, 1/fs) # Time vector from 0 to 2s

# Approximate reflection times and corresponding reflection coefficients


reflection_times = [0.25, 0.5, 0.75, 1.0, 1.3] # Reflection event times
(seconds)
reflection_coeffs = [0.020, 0.099, -0.036, 0.249, 0.224] # Reflection
coefficients

# Initialize reflection series with zeros


R_t = np.zeros(len(t))

# Assign reflection coefficients at the nearest indices


for r_time, r_coeff in zip(reflection_times, reflection_coeffs):
index = np.argmin(np.abs(t - r_time)) # Find nearest index
R_t[index] = r_coeff # Assign reflection coefficient

# Generate a zero-phase Ricker wavelet


def ricker_wavelet(f, length, dt):
t = np.arange(-length/2, length/2, dt)
wavelet = (1 - 2*(np.pi*f*t)**2) * np.exp(-(np.pi*f*t)**2)
return wavelet, t

# Define Ricker wavelet parameters


dominant_freq = 25 # Hz
wavelet_length = 0.2 # seconds

# Generate wavelet
wavelet, wavelet_t = ricker_wavelet(dominant_freq, wavelet_length, 1/fs)

# Convolve wavelet with reflection series


seismic_trace = convolve(R_t, wavelet, mode='same')

# Plot results
plt.figure(figsize=(8, 5))

# Plot reflection series


plt.subplot(2,1,1)
plt.stem(t, R_t, basefmt=" ")
plt.xlabel("Time (s)")
plt.ylabel("Reflection Coefficient")
plt.title("Reflection Series")

# Plot seismic trace


plt.subplot(2,1,2)
plt.plot(t, seismic_trace, 'k')
plt.xlabel("Time (s)")
plt.ylabel("Amplitude")
plt.title("Seismic Trace (Reflection Series Convolved with Ricker Wavelet)")
plt.grid()

plt.tight_layout()
plt.show()

You might also like