EQcorrscan tutorials

Welcome to EQcorrscan - this package is designed to compute earthquake detections using a paralleled matched-filter network cross-correlation routine, and analyse the results.

EQcorrscan is divided into two main sub-modules, the core and utils sub-modules. The core sub-module contains the main, high-level functions:

template_gen:

A series of routines to generate templates for match-filter detection from continuous or cut data, with pick-times either defined manually, or defined in event files;

match_filter:

The main matched-filter routines, this is split into several smaller functions to allow python-based parallel-processing;

subspace:

Subspace detection routine based on Harris (2006).

lag_calc:

Routines for calculating optimal lag-times for events detected by the match-filter routine, these lags can then be used to define new picks for high accuracy re-locations.

Some other high-level functions are included in the utils sub-module and are documented here with tutorials:

mag_calc:

Simple local magnitude calculation and high-precision relative moment calculation using singular-value decomposition.

clustering:

Routines for clustering earthquakes based on a range of metircs using agglomorative clustering methods.

The utils sub-module contains useful, but small functions. These functions are rarely cpu intensive, but perform vital operations, such as finding peaks in noisy data (findpeaks), converting a database to hypoDD formatted files and computing cross-correlations between detections for HypoDD (a double difference relocation software) (catalog_to_dd), calculating magnitudes (mag_calc), clustering detections (clustering), stacking detections (stacking), making plots (plotting), and processing seismic data in the same way repeatedly using Obspy’s functionality (pre_processing).

As of EQcorrscan v.0.4.0, output is controlled by the Logging module. This allows the user to decide now much output is needed (via the level option), and where output should be sent (either to a file, stdout, or both). By default, if no logging parameters are set before calling EQcorrscan functions only messages of WARNING or above are printed to stdout. To make things a little prettier you can begin your work using something like:

import logging

logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s")

This will output messages at level INFO and above (quite verbose), in messages like:

2018-06-25 22:48:17,113       eqcorrscan.utils.pre_processing INFO    Working on: NZ.CPWZ.10.EHZ

For more options, see the Logging HOWTO guide.

The following is an expanding set of tutorials that should take you through some of the key functionality of the EQcorrscan package. The tutorials are a (slow) work in progress to convert to jupyter notebook. If you have anything you want to see in the tutorials please let us know on github.