5.5. locate

Functions to locate earthquakes detected by EQcorrscan. Designed primarily locate stacks of detections to give family locations. Extensions may later be written, not tested for accuracy.

copyright:Calum Chamberlain, Chet Hopp.
license:GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)
locate.cross_net(stream, env=False, debug=0, master=False)[source]

Function to generate picks for each channel based on optimal moveout defined by maximum cross-correaltion with master trace. Master trace will be the first trace in the stream.

Parameters:
  • stream – Stream to pick
  • envelope (bool) – To compute cross-correlations on the envelope or not.
  • debug (int) – Debug level from 0-5
  • master (obspy.Trace) – Trace to use as master, if False, will use the first trace in stream.
Returns:

list of pick class

locate.stalta_pick(stream, stalen, ltalen, trig_on, trig_off, freqmin=False, freqmax=False, debug=0, show=False)[source]

Simple sta-lta (short-term average/long-term average) picker, using obspy’s stalta routine to generate the characteristic function.

Currently very basic quick wrapper, there are many other (better) options in obspy, found (here)[http://docs.obspy.org/packages/autogen/obspy.signal.trigger.html].

Parameters:
  • stream (obspy.Stream) – The stream to pick on, can be any number of channels.
  • stalen (float) – Length of the short-term average window in seconds.
  • ltalen (float) – Length of the long-term average window in seconds.
  • trig_on (float) – sta/lta ratio to trigger a detection/pick
  • trig_off (float) – sta/lta ratio to turn the trigger off - no further pickswill be made between exceeding trig_on until trig_off is reached.
  • freqmin (float) – Low-cut frequency in Hz for bandpass filter
  • freqmax (float) – High-cut frequency in Hz for bandpass filter
  • debug (int) – Debug output level from 0-5.
  • show (bool) – Show picks on waveform.
Returns:

list of pick class.

locate.synth_compare(stream, stream_list, cores=4, debug=0)[source]

Compare a specific stream to a list of synthetic templates, or earthquakes of known source and find the best matching event.

Parameters:
  • stream (:class:obspy.Stream) – Stream to be compared to streams with known locations.
  • stream_list (list) – List of streams with known locations
  • cores (int) – Number of cores to parallel over
  • debug (int) – Debug level, high is more debug
Returns:

int, float: index of best match and cross-correlation sum