Geophydog
https://geophydog.cool/
Recent content on GeophydogHugo -- gohugo.ioenGeophydog All rights reservedMon, 29 Jan 2024 17:51:29 +0800The frequency-Bessel (F-J) transform for estimating multimodal surface wave dispersion curves
https://geophydog.cool/post/the_frequency_bessel_transform/
Mon, 29 Jan 2024 17:51:29 +0800https://geophydog.cool/post/the_frequency_bessel_transform/Background Passive dense array surface wave tomography plays a significant role in probing the earth’s interior with the development of a large number of dense seismic arrays, attracting researchers’ growing interest in imaging applications in various scales. These array methods, like beamforming and MASW (multichannel analysis of surface wave) have been widely used to estimate dispersion curves in past several decades. A new array stacking technique, the frequency-Bessel (F-J) transform, was proposed about five years ago with some main advantages of extracting dispersion curves of high-resolution and broad frequency band (Wang et al.Synthetic ambient noise and noise cross-correlations
https://geophydog.cool/post/synthetic_ambient_noise/
Mon, 29 Jan 2024 11:28:39 +0800https://geophydog.cool/post/synthetic_ambient_noise/1. Background Ambient noise tomography has been a very popular imaging strategy of investigating the earth’s interior in past over two decades. The basic principle of this method is that stacked cross-correlations from noise recordings made by two receivers can be approximately the Green’s function from one receiver to another. We have the need of synthesizing ambient noise for validating this important idea, or exploring characteristics of ambient noise. Here we introduce a simple way of computing synthetic ambient noise.Image transform technique for estimating phase velocity dispersion curve
https://geophydog.cool/post/image_transform_dispersion_curve/
Sun, 28 Jan 2024 19:12:51 +0800https://geophydog.cool/post/image_transform_dispersion_curve/Background Ambient noise tomography is widely used to image th earth’s interior in past over two decades for various scales. Stacked cross-correlations from seismic ambient noise can be approxmately the Green’s functions between receivers. Surface waves extracted from ambient noise cross-correlations are frequently utilized to estimate multi-layered shear wave velocity structure. The key to surface wave imageing is reliable dispersion curves. Two-staion techniques, like frequency-time analysis (Levshin et al., 1989), image transform (Yao et al.Colormaps for Fantastic Visualizations
https://geophydog.cool/post/colormaps_for_fantastic_visualizations/
Fri, 22 Sep 2023 12:22:46 +0800https://geophydog.cool/post/colormaps_for_fantastic_visualizations/Visualization is frequenctly used to show scientific ideas or experimental results, but it is difficult for us to master. There are many styles for different individuals for they favor different colors, markers, and line styles. Color choice is very important to visualize data among above terms. Here we give some colors for making clear our ideas.
1. Empirical probability image We usually use hit counts to compute empirical probability from large datasets, for example, the power spectral density curve of ambient seismic noise.MUltiple SIgnal Classification (MUSIC) Algorithm for Array Processing
https://geophydog.cool/post/music_array_process/
Wed, 20 Sep 2023 14:32:30 +0800https://geophydog.cool/post/music_array_process/1. MUSIC algorithm The naive beamforming technique, Bartlett beamformer, has a poor resolution although its stability and robustness are good. Schmidt proposed a new beamformer algorithm call multiple signal classification (MUSIC) for addressing the resolution while keeping the stability of beamformer (1986). Here we briefly introduce the MUSIC algorithm and also give some Python codes to show how this technique works.
Assuming a signal $u(t)$ and its Fourier spectrum $U(\omega)$ of a receiver, we have a signal vector of an array composed of $N$ receivers at frequency $\omega$.Matched Field Processing: a generalized beamforming
https://geophydog.cool/post/matched_field_processing/
Sat, 04 Jun 2022 09:41:56 +0800https://geophydog.cool/post/matched_field_processing/1. Basic descriptions Matched filed processing (MFP) is a location algorithm that was first applied in ocean acoustics (Baggeroer and Kuperman, 1988). It has been widely used to locate quakes or microseisms in seismology (e.g., Cros et al., 2011; Gal et al., 2018). We here give a short and simple derivation of MFP as follows.
1.1 MFP power Computing the Fourier spectrum vector, $$ \boldsymbol{u}(\omega) = [u_1(\omega), u_2(\omega), \cdots, u_N(\omega)]^T, \tag{1} $$ where, $N$ is the total number of receivers, $T$ means transpose operator, $u_i(\omega)$ is the Fourier spectrum of recordings by receiver $i$, and $\omega$ is angular frequency.Cross Spectral Beamforming in Ambient Noise Cross-correlation
https://geophydog.cool/post/ncf_cross_spectral_beamforming/
Sat, 20 Mar 2021 15:33:02 +0800https://geophydog.cool/post/ncf_cross_spectral_beamforming/Estimating the Power Spectral Density of Ambient Seismic Noise
https://geophydog.cool/post/psd_notes/
Thu, 11 Mar 2021 14:32:42 +0800https://geophydog.cool/post/psd_notes/Geometry on a Sphere
https://geophydog.cool/post/geometry_on_a_sphere/
Tue, 02 Mar 2021 16:05:43 +0800https://geophydog.cool/post/geometry_on_a_sphere/Ocean and Climate Data Source
https://geophydog.cool/post/data_source/
Tue, 26 Jan 2021 16:14:05 +0800https://geophydog.cool/post/data_source/Signal Stacking: Phase-Weighted Stack (PWS)
https://geophydog.cool/post/signal_pws_stack/
Sat, 16 Jan 2021 11:17:54 +0800https://geophydog.cool/post/signal_pws_stack/Matlab GUI Design: popupmenu
https://geophydog.cool/post/matlab_guide_popupmenu/
Wed, 06 Jan 2021 19:15:14 +0800https://geophydog.cool/post/matlab_guide_popupmenu/Matlab GUI Design: axes
https://geophydog.cool/post/matlab_guide_axes/
Sat, 02 Jan 2021 15:26:48 +0800https://geophydog.cool/post/matlab_guide_axes/Seismic Data Processing in Matlab
https://geophydog.cool/post/seismic_data_processing_in_matlab/
Wed, 30 Dec 2020 15:29:30 +0800https://geophydog.cool/post/seismic_data_processing_in_matlab/Matlab GUI Design: the guide tool
https://geophydog.cool/post/matlab_gui_guide/
Wed, 30 Dec 2020 12:29:18 +0800https://geophydog.cool/post/matlab_gui_guide/Useful seismic tools
https://geophydog.cool/post/seismic_useful_tools/
Wed, 30 Dec 2020 09:31:49 +0800https://geophydog.cool/post/seismic_useful_tools/Obtain right Cross-Correlation spectrum
https://geophydog.cool/post/cross-correlation_spectrum/
Mon, 28 Dec 2020 15:29:40 +0800https://geophydog.cool/post/cross-correlation_spectrum/1 Background Ambient seismic noise cross-correlation has far-reaching implications for the passive seismic surface wave imaging from regional to continental scales (e.g. Campillo & Paul, Shapiro & Campillo, 2004). Spectral analysis of cross-correlations is the key to retrieving reliable dispersion information about surface waves. Based on the Fourier spectra of event seismic surface wave data, however, we need to shift the cross-correlation time function before doing FFT to obtain the right spectra.Bessel functions numerical approximations
https://geophydog.cool/post/bessel_functions_computation/
Fri, 25 Dec 2020 17:16:30 +0800https://geophydog.cool/post/bessel_functions_computation/Array response function (Array transfer function)
https://geophydog.cool/post/array_response_function/
Thu, 24 Dec 2020 11:42:11 +0800https://geophydog.cool/post/array_response_function/Multi-channel analysis of Surface waves (MASW)
https://geophydog.cool/post/masw_phase_shift/
Wed, 23 Dec 2020 10:32:52 +0800https://geophydog.cool/post/masw_phase_shift/Vectors in GMT
https://geophydog.cool/post/vectors_in_gmt/
Sun, 08 Nov 2020 18:31:43 +0800https://geophydog.cool/post/vectors_in_gmt/Arrow styles in Cartesian coordinate system 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 PS=plot.ps PDF=plot.pdf R=0/10/0/10 J=X10i/7i gmt psbasemap -R$R -J$J -K -Bx1f0.1 -By1f0.1 -BWSen > $PS echo "1 1 0 2i" | gmt psxy -R -J -K -O -Sv1c+b >> $PS echo "1 2 0 2i" | gmt psxy -R -J -K -O -Sv1c+e >> $PS echo "1 3 0 2i" | gmt psxy -R -J -K -O -Sv1c+b+e >> $PS echo "1 4 0 2i" | gmt psxy -R -J -K -O -Sv1c+b+h1 >> $PS echo "1 5 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+h1 >> $PS echo "1 5 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+h1 -Gred >> $PS echo "1 6 0 2i" | gmt psxy -R -J -K -O -Sv1c+m -Gred >> $PS echo "1 7 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+l -Gred >> $PS echo "1 8 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+r -Gred >> $PS echo "1 9 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+a90 -Gred >> $PS echo "5 1 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+h-2 -Gred >> $PS echo "5 2 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+h-1 -Gred >> $PS echo "5 3 0 2i" | gmt psxy -R -J -K -O -Sv1c+e+h2 -Gred >> $PS echo "5 4 0 2i" | gmt psxy -R -J -K -O -Sv1c+b+e+h0 >> $PS echo "8 1 0 1i" | gmt psxy -R -J -K -O -Sv1c+bt >> $PS echo "8 2 0 1i" | gmt psxy -R -J -K -O -Sv1c+bc >> $PS echo "8 3 0 1i" | gmt psxy -R -J -K -O -Sv1c+ba >> $PS echo "8 4 0 1i" | gmt psxy -R -J -K -O -Sv1c+bA >> $PS echo "8 5 0 1i" | gmt psxy -R -J -K -O -Sv1c+bi >> $PS echo "8 6 0 1i" | gmt psxy -R -J -K -O -Sv1c+bI >> $PS echo "5 5 2i 0 45" | gmt psxy -R -J -K -O -Sm1c+b+e+h1 -Gred>> $PS echo "5 7 2i 0 90" | gmt psxy -R -J -O -Sm1c+b+e+h1 -Gred >> $PS gmt psconvert -E150 -Tg -A -P $PS ps2pdf $PS $PDF evince $PDF rm $PS Vectors in geographic coordinate system 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 R=-100/100/-70/70 J=M7i PS=geo_arrow.Boundary Conditions in PDE
https://geophydog.cool/post/boundary_conditions/
Mon, 02 Nov 2020 20:44:01 +0800https://geophydog.cool/post/boundary_conditions/Boundary condition is necessary when we find the numerial solutions to some equations. Here, we show you some kinds of boundary contions in solving partial difference equation.
1 Dirichlet (fixed) $$ \left \{ \begin{aligned} p(t, x_{min}) &= 0\\
p(t, x_{max}) &= 0 \end{aligned} \right. \tag{1}, $$ where, $p(t, x)$ is what we want to find, let’s say, pressure in acoustic wave equation.
2 Neumann $$ \left \{ \begin{aligned} p(t, x_{min}) &= p(t, x_{min}+\Delta x)\\EGFs from Cross-correlations of Noise Excited by a Circle-Shaped Configuration of Sources
https://geophydog.cool/post/ccf_noise_source/
Tue, 29 Sep 2020 13:43:54 +0800https://geophydog.cool/post/ccf_noise_source/New responses, if the wave field is diffuse, can be retrieved from interstaion cross-correlation of ambient noise. However, the cross-correlation time functions are asymmetric if the noise sources distribute unevenly. Here, we give you an example to show that how the cross-correlation functions vary with the angles of noise sources (red dots). We computed synthetic seismograms of earthquakes with angles from 1 to 360 degrees with an interval of 1 degree and data are recorded by two receivers (blue triangles); then we compute the cross-correlation time functions and align them with the angles; lastly, we stack all the cross-correlations to show you it’s symmetric under the condition that the noise sources distribute evenly.Calculating Ray Parameters Using Obspy
https://geophydog.cool/post/obspy_ray_parameter/
Fri, 25 Sep 2020 08:56:35 +0800https://geophydog.cool/post/obspy_ray_parameter/Usually, we need to do back-projection from our back-azimuth $–$ slowness panel of body waves to geographic locations. We’ll obtain the location of some body phase if we know the ray parameter of the body phase of corresponding epicentral distance. Here, we show you how to calculate the ray parameters versus the epicentral distances using the python library obspy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 from obspy.How to Distribute and Install Your Own Python Package
https://geophydog.cool/post/your_own_python_package/
Tue, 22 Sep 2020 20:12:37 +0800https://geophydog.cool/post/your_own_python_package/Python is very convenient for us to develop a package. How to install your own python package and import it like numpy or other packages? Here, we’ll give a very simple example to you.
1 Prepare your python package Create a empty directory called whatever, and here we name it Lib_Hello. Now give a name to your python package and we call it HelloPackage, and in directory HelloPackage, implement a python module.Numerical Modeling of Acoustic Wave Propagation
https://geophydog.cool/post/acoustic_wave_modeling/
Mon, 21 Sep 2020 22:34:07 +0800https://geophydog.cool/post/acoustic_wave_modeling/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 bySeismic Data Processing in Python
https://geophydog.cool/post/python_data_processing/
Sat, 19 Sep 2020 21:14:22 +0800https://geophydog.cool/post/python_data_processing/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
https://geophydog.cool/post/make_animation_python/
Fri, 18 Sep 2020 17:36:40 +0800https://geophydog.cool/post/make_animation_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
https://geophydog.cool/post/plotting_issues_in_python/
Fri, 18 Sep 2020 15:52:22 +0800https://geophydog.cool/post/plotting_issues_in_python/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
https://geophydog.cool/post/one-way_two-way_filter/
Wed, 16 Sep 2020 08:56:15 +0800https://geophydog.cool/post/one-way_two-way_filter/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.The Journey to Digital Filter Design: Band-pass Filter
https://geophydog.cool/post/band-pass_filter/
Tue, 15 Sep 2020 23:47:06 +0800https://geophydog.cool/post/band-pass_filter/1 Basic princeples To design a Butterworth band-pass filter, we can combine a low-pass filter and a high-pass filter as below, $$ H(z) = H_{lp}(z) \cdot H_{hp}(z) \tag{1}. $$ In previous blogs, we’ve gone over the Butterworth low-pass and high-pass filters. Here, we use the designed filters to construct a band-pass filter. You can also design a Butterworth band-stop filter according to the designed low-pass and high-pass filters if necessary. $$ \begin{cases} H_{lp}(z) &= H_{\omega_2}(z)\\The Journey to Digital Filter Design: High-pass Filter
https://geophydog.cool/post/high-pass_filter/
Tue, 15 Sep 2020 23:42:50 +0800https://geophydog.cool/post/high-pass_filter/1 Basic princeples For a Butterworth high-pass filter, the squared frequency response is given by $$ |H(\omega)|^2 = \frac{1}{1+(\frac{tan\frac{\omega_c}{2}}{\frac{\omega}{2}})^{2N}} \tag{1}. $$ Using $tan\frac{\omega}{2}=\frac{1}{j}\frac{1-e^{-j\omega}}{1+e^{-j\omega}}$ and $z=e^{-j\omega}$, we have $$ |H(z)|^2=\frac{(-1)^N(\frac{1-z^{-1}}{1+z^{-1}})^{2N}}{(-1)^N(\frac{1-z^{-1}}{1+z^{-1}})^{2N}+tan^{2N}\frac{\omega_c}{2}} \tag{2}. $$ We know there $N$ repeated zeros $1$ of this transfer function, and the poles are little bit complicated. We first calculate $q_k=\frac{1-z_k^{-1}}{1+z^{-1}}$. $$ q_k= \begin{cases} &tan\frac{\omega_c}{2}e^{j\frac{2k+1}{2N}\pi}, \text{ for } N \text{ is even and }k=0, 1, 2, \cdots, 2N-1;\\Error Bars in GMT
https://geophydog.cool/post/gmt_errorbar/
Mon, 14 Sep 2020 16:30:22 +0800https://geophydog.cool/post/gmt_errorbar/1 2 3 4 5 6 7 8 9 10 11 12 13 14 R=0/10/0/100 J=X5i/5i PS=error-bar-gmt.ps PDF=error-bar-gmt.pdf awk 'BEGIN{for(i=2;i<10;i++){print i,i*i}}' > tmp.lst psxy -R$R -J$J -K -T > $PS psxy tmp.lst -R -J -K -O -B1:"X-axis":/10:"Y-axis":WSen -W1p,"--" >> $PS awk '{print $1,$2,3.5,1}' tmp.lst | psxy -R -J -K -O -Ey/3p >> $PS psxy tmp.lst -R -J -K -O -Si0.5c -Gblack >> $PS psxy -R -J -O -T>> $PS ps2pdf $PS $PDF Print Colorful Strings in C
https://geophydog.cool/post/colorful_strings_in_c/
Mon, 14 Sep 2020 16:25:13 +0800https://geophydog.cool/post/colorful_strings_in_c/It’s wonderful to print colorful strings on your terminal and here we show you how to do that.
1 2 3 4 5 6 7 8 9 10 11 #include <stdio.h> int main() { char ss[1024] = {"Colorful!!!"}; printf("\033[0;31m %s \033[0;39m\n", ss); // red printf("\033[0;32m %s \033[0;39m\n", ss); // green printf("\033[0;33m %s \033[0;39m\n", ss); // yellow printf("\033[0;34m %s \033[0;39m\n", ss); // blue printf("\033[0;35m %s \033[0;39m\n", ss); // purple return 0; } Function Pointer & Pointer Function
https://geophydog.cool/post/func_ptr_and_ptr_func/
Mon, 14 Sep 2020 16:12:24 +0800https://geophydog.cool/post/func_ptr_and_ptr_func/1 Ponter function Function pointer is a pointer in c, and it returns a pointer of some type. For instance, its declaration follows
1 2 int *f(int x, int y); Let’s give a code demo to show function pointer.
1 2 3 4 5 6 7 8 9 10 11 12 13 int *add2Num() { int x = 10, y = 20; static int out[3] = {0}; out[0] = 10; out[1] = y; out[2] = x + y; return out; } int main() { int *p = NULL; p = add2Num(); printf("%d\n", *(p+1)); return 0; } Output 20Awk notes
https://geophydog.cool/post/awk_notes/
Sat, 12 Sep 2020 20:30:29 +0800https://geophydog.cool/post/awk_notes/1 Remove repeated lines Sometimes we want to remove these repeated lines according to some column(s).
1 awk '!a[$2,$3]++' pushLog.log Above command will print the unique lines after removing repeated in columns 2 and 3.
For instance, there are some SAC files with same header gcarc, and can use the following command to achieve that.
1 saclst gcarc f *.SAC | sort -k2 -n -r | awk '!Basemap in Python
https://geophydog.cool/post/basemap/
Sat, 12 Sep 2020 14:24:47 +0800https://geophydog.cool/post/basemap/1 Installation Here, the platforms are windows 10 and Anaconda-3.5.3.0 (Python 3.7).
Open anaconda prompt type pip install geos to install library geos; Go https://www.lfd.uci.edu/~gohlke/pythonlibs/ to download two libraries: pyproj‑2.6.1.post1‑cp37‑cp37m‑win_amd64.whl and basemap‑1.2.2‑cp37‑cp37m‑win_amd64.whl Type commands: pip install pyproj‑2.6.1.post1‑cp37‑cp37m‑win_amd64.whl and pip install basemap‑1.2.2‑cp37‑cp37m‑win_amd64.whl Now, we’ve installed Basemap and enjoy it!
2 The First Basemap 2.1 Satellite map 1 2 3 4 5 6 7 8 9 10 11 12 13 from mpl_toolkits.
https://geophydog.cool/post/nice_cover/
Sat, 12 Sep 2020 10:07:00 +0800https://geophydog.cool/post/nice_cover/Hello, there. Hope you have a nice journey. 1 1 2 3 4 5
2 2 3 4 5 6
3 3 4 5 6 7The Journey to Digital Filter Design: Low-pass Filter
https://geophydog.cool/post/low-pass_filter/
Fri, 11 Sep 2020 22:04:26 +0800https://geophydog.cool/post/low-pass_filter/Butterworth filters $$ |H(w)|^2=\frac{1}{1+( \frac{tan\frac{\omega}{2}} {tan\frac{\omega_c}{2}})^{2N}} \tag{1} $$
Low-pass filter Given the attenuation values $A_c$ and $A_r$ at cut-off frequencies $\omega_c$ and $\omega_r$, respectively, we first calculate the orders $N$ of filter. We know, $$ \begin{aligned} A_r &= -20lg|H(\omega_s)|\\
&= -20lg\frac{1}{\sqrt{1+(\frac{tan\frac{\omega _r}{2}}{\frac{\omega_c}{2}})^{2N}}} \end{aligned} \tag{2}, $$ and the orders $N$ is given by $$ N = \frac{1}{2}\frac{lg(10^{\frac{A_r}{10}}-1)}{lg(\frac{tan\frac{\omega_r}{2}}{tan\frac{\omega_c}{2}})} \tag{3}. $$ However, if you give the filter orders $N$, it can control the width of transition band of the filter.Cross-correlations From Seismic Ambient Noise
https://geophydog.cool/post/cross_correlation_from_noise/
Tue, 08 Sep 2020 22:11:34 +0800https://geophydog.cool/post/cross_correlation_from_noise/New responses between station pairs can be extracted from diffuse wave field by cross-correlating ambient seismic noise or coda (Campillo & Paul, 2003; Bensen et al., 2007). However, some processing techniques should be taken into consideration to retrieve clear emperical green’s functions (EGFs). Here we show these steps in detail.
$\boxed{\text{Data processing steps}}$
1. Cut data 2. Removing mean, trend and tapering 3. Removing instrument response 4. Band-pass filtering 5. Temperal normalization $\boxed{\text{One-bit}}$ $$ \tilde{d_j}=sign(d_j) \tag{1} $$ $\boxed{\text{run absolute mean}}$ $$ \begin{aligned} w_j &= \frac{1}{2N+1}\sum_{n=j-N}^{j+N}|d_n| \\Cross Spectral Beamforming
https://geophydog.cool/post/cross_spectra_beamforing/
Mon, 07 Sep 2020 22:40:07 +0800https://geophydog.cool/post/cross_spectra_beamforing/1 Basic principles Detection of coherent seismic signals is an interesting topic in seismology. However, it’s difficult to identify these coherent signals with single station because of the low signal to noise ratios (SNRs). Based on the array processing techniques in radial astronomy, radar and acoustics, the seismic array methods have been developed well in the past several decades. Here, we just follow the articles contributed by (Capon, 1970; Euler et al.Advanced Operations in Eigen3
https://geophydog.cool/post/advanced_eigen3/
Sat, 05 Sep 2020 10:30:18 +0800https://geophydog.cool/post/advanced_eigen3/1 Matrix <-> C/C++ array 1.1 Matrix -> C/C++ array .data() stores the address, so we can give the address to a pointer.
1.2. C/C++ array -> Matrix Using Map to convert a C/C++ array to a Matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include <iostream>#include <Eigen/Dense> using namespace Eigen; using namespace std; int main(int argc, char *argv[]){ int n; n = atoi(argv[1]); MatrixXf b(n, 1); b = MatrixXf::Random(n, 1); cout << "b:\n" << b << endl; // convert Matrix b to C/C++ array c.Basic Operations in Eigen3 C++
https://geophydog.cool/post/eigen3_operations/
Fri, 04 Sep 2020 10:37:51 +0800https://geophydog.cool/post/eigen3_operations/1. Settings of Eigen 1.1 Here Eigen3 Type sudo apt-get install libeigen3-dev to install Eigen3. It will be installed in the default directory /usr/include/eigen3. Just copy Eigen under /usr/include/eigen3 to the directory /usr/include. 1.2 Header files 1 2 #include <Eigen/Dense>using namespace Eigen; 1.3 Tips MatrixXd m(r, c); “X” means “dynamic”, “d” means basic data type “double”， “r” and “c” indicate no. of rows an columns.Hilbert Transform
https://geophydog.cool/post/hilbert_transform/
Thu, 03 Sep 2020 21:23:30 +0800https://geophydog.cool/post/hilbert_transform/Firstly, compute the FFT of real signal $x(n)$ $$ X(k) = \mathscr{F}[x(n)]=\sum_{n=0}^{N-1}x(n)e^{-\frac{i2\pi kn}{N}} \tag{1}. $$
Let the FFT of $h(n)$ be $H(k)$ to yield
$$ H(k)= \begin{cases} &X(k), &\text{ for } k=0 \\
&2X(k), &\text{ for } k=1, 2, \cdots, \frac{N}{2}-1 \\
&0, &\text{ for } k=\frac{N}{2}, \frac{N}{2}+1,\cdots, N-1 \end{cases} \tag{2}. $$
The hilbert transform $h(n)$ of the real signal $x(n)$ is given by
$$ h(n) = \mathscr{I} \{ \mathscr{F}^{-1}[H(k)] \} \tag{3}.About
https://geophydog.cool/post/about/
Thu, 03 Sep 2020 19:16:06 +0800https://geophydog.cool/post/about/Geophydog’s research interests focus on multimodal surface waves, seismic tomography for resource exploration, seismic interferometry, array seismology, seismic ambient noise source, softwares for civil engineering purposes. These blog webpages are used to take academic notes for his researches, which comes with no any WARRANTY!!!
Education 2019 – 2023, PhD of Mechanics, Department of Earth and Space Sciences, Southern University of Science and Technology (SUSTech)
2016 – 2019, Master of seismology, School of Earth Sciences and Eingineering, Nanjing University (NJU)Fourier Transform
https://geophydog.cool/post/fourier_transform/
Thu, 03 Sep 2020 17:11:08 +0800https://geophydog.cool/post/fourier_transform/1 Introduction The $Fourier \ Transform$ convert the signal in one domain to another domain, for instance from time domain to frequency domain. The definition of $Fourier \ Transform$ is given by $$ X(\omega) = \int_{-\infty}^\infty x(t)e^{-i \omega t} \tag{1}. $$
For the operation in programming, we need its discrete form, namely, $$ X(k) = \sum_{n=0}^{N-1}x(n) e^{\frac{-i2\pi kn}{N}} \tag{2}, $$ where, $k$ is the index of the $k_{th}$ frequency point, and we can find the $k_{th}$ frequency like this $$ f_k = \frac{kf_s}{N} \tag{3}, $$ $f_s$ is sampling rate of signal and $f_s=\frac{1}{\Delta t}$.