Numerical Modeling of Acoustic Wave Propagation

1 Acoustic wave equation The acoustic wave equation in vector form is given by $$ p_{tt}=c^2 \nabla^2 p \tag{1} $$ where, $p$ is the acoustic pressure, $c$ is the propagation speed of acoustic wave, $p_{tt}$ is the second time derivative of $p$, and $\nabla^2$ denotes the $Laplacian$ operator. We will discretize the equation using finite difference method in the following parts. 2 Propagation in 1D space The Taylar’s series of $p(t+\Delta t)$ and $p(t-\Delta t)$ are given by

Seismic Data Processing in Python

1 Obtaining Seismic Data Using Obspy 1.1 Basic usage 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 from obspy.clients.fdsn import Client from obspy.core import UTCDateTime # Create a data service from 'IRIS' data center. client = Client('IRIS') # Setting the start time of waveforms. t1 = UTCDateTime('2019-09-04T00:00:00') # End time of waveforms: 3600 seconds shift relative to t1. t2 = t1 + 3600 # Get waveforms.

Make Animations with Python

1 The first animation Making animations using Python is very convenient and here we first implement the propagation of a sine or cosine function; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import numpy as np import matplotlib.pyplot as plt from matplotlib import animation t = np.linspace(0, 3*np.pi, 61) s = np.sin(t) fig = plt.figure(figsize=(6, 3)) line, = plt.

Settings in Python Plotting

1 Pseudo-color map with polar projection We usually need to plot pseudo-color maps in polar projection besides except of those in Cartesian projection. Setting the projection as polar in method subplot. Here , we give an example of python code. Example: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import numpy as np import matplotlib.pyplot as plt theta = np.linspace(0, 2*np.pi, 121) r = np.

The Journey to Digital Filter Design: One-way and Two-way Filters

1 One-way filtering For given filter transfer function $H(\omega)$, the filtered data $X_1(\omega)$ is $$ \begin{cases} X_1(\omega) &= H(\omega) \cdot X(\omega)\\ x_1(t) &= \mathscr{R} \{ \mathscr{F}^{-1}[X_1(\omega)] \} \end{cases} \tag{1}. $$ Eq. $(1)$ is called $one-way$ filtering, and it ensure that the onsets of original and filtered signals are at the same moment. 2 Two-way filtering However, if we want to ensure that the peaks of original and filtered signals are at the same moment, we need to filter again, which is named $two-way$ filtering.