Software to compute interstation correlations, including fast implementations of geometrically-normalized (CCGN), 1-bit correlation (1-bit CCGN), and phase cross-correlations (PCC) with and without using the GPU (Ventosa et al., SRL 2019).
The software packages of fast phase cross-correlation and ts-PWS stacking are basic building blocks in the design of efficient signal extraction methods from interstation correlations.
Computes 3 types of correlations:
- The standard (geometrically) normalized cross-correlations (GNCC).
- The 1-bit amplitude normalization followed by the GNCC (1-bit GNCC).
- The phase cross-correlation (PCC).
The computations of PCC are accerated in several ways:
- PCC is parallelized in the CPU using OpenMP 3.1 and in the GPU using CUDA (two independent codes).
- The computational cost of PCC with power of 2 is reduced to about twice the one of 1-bit GNCC.
To compile execute "make" in the src directory. Use "make clean" to remove any previouly compiled code.
- The Seismic Analysis Code (SAC) is used to read and write sac files.
- The FFTW double and single precision libraries are used. If you have to compile them for your system, follow the fftw.org instructions.
- The SACHOME enviorment variable should provide the path to the directory where sac is
installed. For example, this can be defined in bash as:
export SACHOME=/opt/sac
Change "/opt/sac" to your current sac directory if necessary. - OpenMP 3.1 is used to speed up computations. When OpenMP is not available, use: make -f makefile_NoOpenMP".
The precompiled sac libraries may not work in some systems/compilers. If you use the gcc compiler on Ubuntu 16.04 or 18.04 you may have errors similar to:
/usr/bin/ld: /opt/sac/lib/sacio.a(getfhv.o): relocation R_X86_64_32 against undefined symbol 'kmlhf' can not be used when making a PIE object; recompile with -fPIC
This can be solved by compiling the source version of SAC. From the source directory of sac do:
./configure --enable-optim=2 --prefix=/opt/sac CFLAGS='-march=native -fPIC'
make
make install
The key detail here is the -fPIC flag, you can adapt the other options to your needs. The flag --prefix=/opt/sac sets the directory where sac will be installed when doing "make install". You can change this directory, e.g., to keep using your current version of SAC for other purposes.
- Read ./examples/example.sh
- Execute it, e.g., bash example.sh
- Do PCC_fullpair_1b for the parameters usage.
Schimmel, M., 1999. Phase cross-correlations: Design, comparisons, and applications, Bulletin of the Seismological Society of America, 89(5), 1366-1378.
Schimmel, M. and Stutzmann, E. & J. Gallart, 2011. Using instantaneous phase coherence for signal extraction from ambient noise data at a local to a global scale, Geophysical Journal International, 184(1), 494-506, doi:10.1111/j.1365-246X.2010.04861.x
Ventosa S., Schimmel M. & E. Stutzmann, 2019. Towards the processing of large data volumes with phase cross-correlation, Seismological Research Letters, 90(4), 1663-1669, doi:10.1785/0220190022
2020/10/01 Sergi Ventosa Rahuet (sergiventosa(at)hotmail.com)