seisnoise.jl

Ambient Noise Cross-Correlation in Julia

https://github.com/juliaseismo/seisnoise.jl

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    3 of 7 committers (42.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

ambient-noise cross-correlation hpc julia seismic seismology

Keywords from Contributors

surrogate fluxes pdes polytope energy-systems hybrid-differential-equations ida neural-sde matrix-exponential estimation
Last synced: 6 months ago · JSON representation ·

Repository

Ambient Noise Cross-Correlation in Julia

Basic Info
  • Host: GitHub
  • Owner: JuliaSeismo
  • License: mit
  • Language: Julia
  • Default Branch: master
  • Size: 4.69 MB
Statistics
  • Stars: 59
  • Watchers: 6
  • Forks: 18
  • Open Issues: 32
  • Releases: 10
Topics
ambient-noise cross-correlation hpc julia seismic seismology
Created almost 7 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

SeisNoise.jl :sound: :earth_americas:

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 julia>] (@v1.9) pkg> add SeisNoise

Or, equivalently, via the Pkg API:

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

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

julia (@v1.9) pkg> update SeisNoise

Package Features

flow

  • Built upon SeisBase 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

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

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

```julia

create raw data and send to GPU

R = RawData(S1, cclen, ccstep) |> 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:

```julia

send data to GPU

R1 = RawData(S1, cclen, ccstep) |> gpu R2 = RawData(S2, cclen, ccstep) |> 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:

bib @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.

Owner

  • Name: JuliaSeismo
  • Login: JuliaSeismo
  • Kind: organization

Julia Ecosystem for seismology

Citation (CITATION.bib)

@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},
}

GitHub Events

Total
  • Watch event: 6
  • Fork event: 1
Last Year
  • Watch event: 6
  • Fork event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 272
  • Total Committers: 7
  • Avg Commits per committer: 38.857
  • Development Distribution Score (DDS): 0.151
Past Year
  • Commits: 6
  • Committers: 2
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.167
Top Committers
Name Email Commits
Tim Clements t****s@g****u 231
github-actions[bot] 4****] 28
Tim Clements t****s@u****v 6
timclements t****s@p****n 4
Stephanie Olinger s****r@f****u 1
Julia TagBot 5****t 1
kura-okubo k****o@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 29
  • Total pull requests: 71
  • Average time to close issues: 3 months
  • Average time to close pull requests: 29 days
  • Total issue authors: 13
  • Total pull request authors: 3
  • Average comments per issue: 2.97
  • Average comments per pull request: 0.07
  • Merged pull requests: 38
  • Bot issues: 0
  • Bot pull requests: 56
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • stepholinger (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite