Skip to content

Nearest-Neighbor-Distance algorithm to decluster seismic catalog in Python

Notifications You must be signed in to change notification settings

florentaden/nnd_declustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NND declustering

Nearest-Neighbor-Distance algorithm to decluster seismic catalog in Python based on the work of Baiesi & Paczuski 2004 and Zaliapin et al. 2008.

The code make_declustering.py finds for each event of a given catalog its nearest neighbor. The utilisator is invited to select his own threshold to make the distinction between aftershocks and background events.

An example is provided with the Southern California Earthquake Data Center catalog from 2014 to 2019.


It requires the package mpi4py which can be simply install with:

conda install -c anaconda mpi4py

or

pip install mpi4py

for more information have a look here.


The file needs to contain the following headers: - year - month - day - hour - minute - second - time: first event is 0, can be second, day, etc.. - latitude - longitude - depth: not taken account in the current version. However, easy to implement. - magnitude

The output will add the following columns: - Tij: the rescaled Time with the with the nearest neighbor - Rij: the rescaled Distance - Nij: the nearest neighbor distance metric - parent_magnitude - neighbor: the index of the nearest neighbor


The code is able to run in serial:

python make_declustering.py

or in parallel on a laptop or a node on a cluster (>= 1 node):

mpirun -np <number of cpu desired> python make_declustering.py

Aden-Antoniow2020

About

Nearest-Neighbor-Distance algorithm to decluster seismic catalog in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages