Giter Site home page Giter Site logo

marscfeng / fastpcc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sergiventosa/fastpcc

0.0 1.0 0.0 29.18 MB

Compute interstation correlations of seismic ambient noise, including fast implementations of the standard, 1-bit and phase cross-correlations.

License: GNU Lesser General Public License v3.0

C 90.40% Cuda 6.58% Makefile 1.74% C++ 1.28%

fastpcc's Introduction

Fast phase cross-correlation

License: LGPL v3

Software to compute interstation correlations, including fast implementations of the phase cross-correlation with and without using the GPU (Ventosa et al., SRL 2019)

Main features

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.

Compilation

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".

Compile SAC

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.

Warming up

  1. Read ./examples/example.sh
  2. Execute it, e.g., bash example.sh
  3. Do PCC_fullpair_1b for the parameters usage.

Origin of Phase Cross-Correlation

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

Paper to be cited

Ventosa S., Schimmel M. & E. Stutzmann, 2019. Towards the processing of large data volumes with phase cross-correlation, Seismological Research Letters, doi:10.1785/0220190022

2019/05/23 Sergi Ventosa Rahuet (sergiventosa(at)hotmail.com)

fastpcc's People

Contributors

sergiventosa avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.