3.6.1.2. quakemigrate.signal.pickers

The quakemigrate.pickers module handles the picking of seismic phases. The default method makes the phase picks by fitting a 1-D Gaussian to the Onset function.

Feel free to contribute more phase picking methods!

copyright:2020, QuakeMigrate developers.
license:GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html)

3.6.1.2.1. quakemigrate.signal.pickers.base

A simple abstract base class with method stubs enabling simple modification of QuakeMigrate to use custom phase picking methods that remain compatible with the core of the package.

copyright:2020, QuakeMigrate developers.
license:GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html)
class quakemigrate.signal.pickers.base.PhasePicker(**kwargs)[source]

Bases: abc.ABC

Abstract base class providing a simple way of modifying the default picking function in QuakeMigrate.

plot_picks

Toggle plotting of phase picks.

Type:bool
pick_phases()[source]

Abstract method stub providing interface with QuakeMigrate scan.

write(event_uid, phase_picks, output)[source]

Outputs phase picks to file.

plot()[source]

Method stub for phase pick plotting.

pick_phases()[source]

Method stub for phase picking.

plot()[source]

Method stub for phase pick plotting.

write(run, event_uid, phase_picks)[source]

Write phase picks to a new .picks file.

Parameters:
  • event_uid (str) – Unique identifier for the event.
  • phase_picks (pandas DataFrame object) –
    Phase pick times with columns: [“Name”, “Phase”,
    ”ModelledTime”, “PickTime”, “PickError”, “SNR”]

    Each row contains the phase pick from one station/phase.

  • output (QuakeMigrate input/output control object) – Contains useful methods controlling output for the scan.

3.6.1.2.2. quakemigrate.signal.pickers.gaussian

The default seismic phase picking class - fits a 1-D Gaussian to the calculated onset functions.

copyright:2020, QuakeMigrate developers.
license:GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html)
class quakemigrate.signal.pickers.gaussian.GaussianPicker(onset=None, **kwargs)[source]

Bases: quakemigrate.signal.pickers.base.PhasePicker

This class details the default method of making phase picks shipped with QuakeMigrate, namely fitting a 1-D Gaussian function to the STA/LTA onset function trace for each station.

phase_picks
“GAU_P” : array-like
Numpy array stack of Gaussian pick info (each as a dict) for P phase
“GAU_S” : array-like
Numpy array stack of Gaussian pick info (each as a dict) for S phase
Type:dict
pick_threshold

Picks will only be made if the onset function exceeds this percentile of the noise level (average amplitude of onset function outside pick windows). Recommended starting value: 1.0

Type:float (between 0 and 1)
plot_picks

Toggle plotting of phase picks.

Type:bool
pick_phases(data, lut, event, event_uid, output)[source]

Picks phase arrival times for located earthquakes by fitting a 1-D Gaussian function to the P and S onset functions

DEFAULT_GAUSSIAN_FIT = {'PickValue': -1, 'popt': 0, 'xdata': 0, 'xdata_dt': 0}
fraction_tt

Handler for deprecated attribute ‘fraction_tt’

pick_phases(event, lut, run)[source]

Picks phase arrival times for located earthquakes.

Parameters:
  • event (Event object) – Contains pre-processed waveform data on which to perform picking, the event location, and a unique identifier.
  • lut (LUT object) – Contains the traveltime lookup tables for seismic phases, computed for some pre-defined velocity model.
  • run (Run object) – Light class encapsulating i/o path information for a given run.
Returns:

  • event (Event object) – Event object provided to pick_phases(), but now with phase picks!
  • picks (pandas.DataFrame) – DataFrame that contains the measured picks with columns: [“Name”, “Phase”, “ModelledTime”, “PickTime”, “PickError”, “SNR”] Each row contains the phase pick from one station/phase.

plot(event, lut, picks, ttimes, run)[source]

Plot figure showing the filtered traces for each data component and the characteristic functions calculated from them (P and S) for each station. The search window to make a phase pick is displayed, along with the dynamic pick threshold (defined as a percentile of the background noise level), the phase pick time and its uncertainty (if made) and the Gaussian fit to the characteristic function.

Parameters:event_uid (str, optional) – Earthquake UID string; for subdirectory naming within directory {run_path}/traces/