All Projects → tclements → SeisNoise.jl

tclements / SeisNoise.jl

Licence: MIT license
Ambient Noise Cross-Correlation in Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to SeisNoise.jl

QuakeMigrate
A Python package for automatic earthquake detection and location using waveform migration and stacking.
Stars: ✭ 101 (+134.88%)
Mutual labels:  seismology, seismic
Gisola
Gisola: A High Performance Computing application for real-time Moment Tensor inversion
Stars: ✭ 35 (-18.6%)
Mutual labels:  hpc, seismology
FastPCC
Compute interstation correlations of seismic ambient noise, including fast implementations of the standard, 1-bit and phase cross-correlations.
Stars: ✭ 24 (-44.19%)
Mutual labels:  seismology, seismic
awesome-aws-research
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources for Academic Researchers new to AWS
Stars: ✭ 41 (-4.65%)
Mutual labels:  hpc
hpc
Learning and practice of high performance computing (CUDA, Vulkan, OpenCL, OpenMP, TBB, SSE/AVX, NEON, MPI, coroutines, etc. )
Stars: ✭ 39 (-9.3%)
Mutual labels:  hpc
RamaNet
Preforms De novo protein design using machine learning and PyRosetta to generate a novel protein structure
Stars: ✭ 41 (-4.65%)
Mutual labels:  hpc
Lazylyst
Lazylyst is a GUI created for time series review, using a flexible framework for new workflows
Stars: ✭ 16 (-62.79%)
Mutual labels:  seismology
community datasets
Example datasets and dashboards known to work well in OmniSci
Stars: ✭ 14 (-67.44%)
Mutual labels:  hpc
gslib
sparse communication library
Stars: ✭ 22 (-48.84%)
Mutual labels:  hpc
HPC
A collection of various resources, examples, and executables for the general NREL HPC user community's benefit. Use the following website for accessing documentation.
Stars: ✭ 64 (+48.84%)
Mutual labels:  hpc
CARE
CHAI and RAJA provide an excellent base on which to build portable codes. CARE expands that functionality, adding new features such as loop fusion capability and a portable interface for many numerical algorithms. It provides all the basics for anyone wanting to write portable code.
Stars: ✭ 22 (-48.84%)
Mutual labels:  hpc
seismic-facies-identification-starter-kit
More details about the competition: https://www.aicrowd.com/challenges/seismic-facies-identification-challenge
Stars: ✭ 25 (-41.86%)
Mutual labels:  seismic
OrientPy
Seismic station orientation tools
Stars: ✭ 29 (-32.56%)
Mutual labels:  seismology
LvArray
Portable HPC Containers (C++)
Stars: ✭ 37 (-13.95%)
Mutual labels:  hpc
rTRNG
R package providing access and examples to TRNG C++ library
Stars: ✭ 17 (-60.47%)
Mutual labels:  hpc
waldur-mastermind
Waldur MasterMind is a hybrid cloud orchestrator.
Stars: ✭ 37 (-13.95%)
Mutual labels:  hpc
luna
Provisioning tool for clusters
Stars: ✭ 58 (+34.88%)
Mutual labels:  hpc
pcluster-manager
Manage AWS ParallelCluster through an easy to use web interface
Stars: ✭ 67 (+55.81%)
Mutual labels:  hpc
pytokio
[READ ONLY] Refer to gitlab repo for updated version - Total Knowledge of I/O Reference Implementation. Please see wiki for contribution guidelines.
Stars: ✭ 20 (-53.49%)
Mutual labels:  hpc
julea
A Flexible Storage Framework for HPC
Stars: ✭ 25 (-41.86%)
Mutual labels:  hpc

SeisNoise.jl 🔉 🌎

SeisNoise.jl is designed for fast and easy ambient noise cross-correlation on the CPU and GPU in Julia.

Documentation Build Status Coverage Chat
Build Status Coverage Status

Installation

You can install the latest version of SeisNoise using the Julia package manager (Press ] to enter pkg). From the Julia command prompt:

julia>]
(@v1.6) pkg> add SeisNoise

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("SeisNoise")

We recommend using the latest version of SeisNoise by updating with the Julia package manager:

(@v1.6) pkg> update SeisNoise

Package Features

flow

  • Built upon SeisIO for easy and fast I/O.
  • Custom structures for storing Raw Data, Fourier Transforms of data, and cross-correlations
  • CPU/GPU compatible functions for cross-correlation.
  • Methods for dv/v measurements.
  • Coming soon: Dispersion analysis.

Check out the SeisNoise GPU tutorial on NextJournal!

SeisNoise Cross-Correlation Example

Once you have installed the package you can type using SeisNoise to start cross-correlating. SeisNoise uses a functional syntax to implement cross-correlation. For example

using SeisNoise, SeisIO, Plots
fs = 40. # sampling frequency in Hz
freqmin,freqmax = 0.1,0.2 # min and max frequencies
cc_step, cc_len = 450, 1800 # corrleation step and length in S
maxlag = 60. # maximum lag time in correlation
s = "2019-02-03"
t = "2019-02-04"
S1 = get_data("FDSN","CI.SDD..BHZ",src="SCEDC",s=s,t=t)
S2 = get_data("FDSN","CI.PER..BHZ",src="SCEDC",s=s,t=t)
process_raw!(S1,fs)
process_raw!(S2,fs)
R = RawData.([S1,S2],cc_len,cc_step)
detrend!.(R)
taper!.(R)
bandpass!.(R,freqmin,freqmax,zerophase=true)
FFT = rfft.(R)
whiten!.(FFT,freqmin,freqmax)
C = correlate(FFT[1],FFT[2],maxlag)
clean_up!(C,freqmin,freqmax)
abs_max!(C)
plot(C)

will produce this figure:

plot1

Cross-correlation on the GPU

SeisNoise can process data and compute cross-correlations on the GPU with CUDA. The JuliaGPU suite provides a high-level interface for CUDA programming through the CUDA.jl package. CUDA.jl provides an the CuArray type for storing data on the GPU. Data in SeisNoise structures (R.x, F.fft, and C.corr fields, for RawData, FFTData, and CorrData, respectively) can move between an Array on the CPU to a CuArray on the GPU using the gpu and cpu functions, as shown below.

⚠️ Only Nvidia GPUs are suported at the moment. Hold in there for AMD/OpenCL support...

# create raw data and send to GPU
R = RawData(S1, cc_len, cc_step) |> gpu
R.x
72000×188 CUDA.CuArray{Float32,2,Nothing}

# send data back to the CPU
R = R |> cpu
R.x
72000×188 Array{Float32,2}

All basic processing remains the same on the GPU. Here is a complete cross-correlation routine on the GPU:

# send data to GPU
R1 = RawData(S1, cc_len, cc_step) |> gpu
R2 = RawData(S2, cc_len, cc_step) |> gpu
R = [R1,R2]

# preprocess on the GPU
detrend!.(R)
taper!.(R)
bandpass!.(R,freqmin,freqmax,zerophase=true)

# Real FFT on GPU
FFT = rfft.(R)
whiten!.(FFT,freqmin,freqmax)

# compute correlation and send to cpu
C = correlate(FFT[1],FFT[2],maxlag) |> cpu

Routines Implemented on the GPU

gpu times

Processing times for a selection of routines on the GPU with Julia + GPU (white), Julia + CPU (black), and Python (grey). Currently these operations are implemented in SeisNoise on the GPU:

  • Preprocessing:
    • detrend,demean, taper, onebit, smooth
  • Filtering:
    • bandpass, bandstop, lowpass, highpass
  • Fourier Domain:
    • whiten, rfft, irfft
  • Cross-correlation:
    • correlate, cross-coherence, deconvolution
  • Post-processing:
    • stack, filters, etc..

Cite SeisNoise

If you use SeisNoise in your work, please star the package and cite our work DOI: 10.1785/0220200192:

@article{SeisNoise.jl-2020,
  author = {Clements, Timothy and Denolle, Marine A.},
  title = {SeisNoise.jl: Ambient Seismic Noise Cross Correlation on the CPU and GPU in Julia},
  journal = {Seismological Research Letters},
  year = {2020},
  month = {09},
  issn = {0895-0695},
  doi = {10.1785/0220200192},
  url = {https://doi.org/10.1785/0220200192},
  eprint = {https://pubs.geoscienceworld.org/srl/article-pdf/doi/10.1785/0220200192/5156069/srl-2020192.1.pdf},
}

Contributing

We welcome folks interested in contributing to SeisNoise. Please open an issue to let us know about bug reports, new methods/code, and or feature requests/usage cases. If you would like to submit a pull request (PR), please include accompanying tests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].