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–2023, 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–2023, 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
Abstract base class providing a simple way of modifying the default picking function in QuakeMigrate.
- plot_picks
Toggle plotting of phase picks.
- Type
bool
- 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–2023, 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:
PhasePicker
This class details the default method of making phase picks shipped with QuakeMigrate, namely fitting a 1-D Gaussian function to the onset function for each station and phase.
- 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
- threshold_method
Which method to use to calculate the pick threshold; a percentile of the data outside the pick windows (e.g. 0.99 = 99th percentile) or a multiple of the Median Absolute Deviation of the signal outside the pick windows. Default uses the MAD method.
- Type
{“MAD”, “percentile”}
- percentile_pick_threshold
Picks will only be made if the onset function exceeds this percentile of the noise level (amplitude of onset function outside pick windows). (Default: 1.0)
- Type
float, optional
- mad_pick_threshold
Picks will only be made if the onset function exceeds its median value plus this multiple of the MAD (calculated from the onset data outside the pick windows). (Default: 8)
- Type
float, optional
- plot_picks
Toggle plotting of phase picks.
- Type
bool
- pick_phases(event, lut, run)[source]
Picks phase arrival times for located events by fitting a 1-D Gaussian function to the P and/or S onset functions
- DEFAULT_GAUSSIAN_FIT = {'PickValue': -1, 'popt': 0, 'xdata': 0, 'xdata_dt': 0}
- property fraction_tt
Handler for deprecated attribute ‘fraction_tt’
- pick_phases(event, lut, run)[source]
Picks phase arrival times for located events.
- Parameters
event (
Event
object) – Light class encapsulating waveforms, coalescence information and location information for a given event.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.
- property pick_threshold
Handler for deprecated attribute ‘pick_threshold’
- plot(event, station, onset_data, picks_df, traveltimes, run)[source]
Plot figure showing the filtered traces for each data component and the onset functions calculated from them (P and/or S) for each station. The search window to make a phase pick is displayed, along with the dynamic pick threshold, the phase pick time and its uncertainty (if made) and the Gaussian fit to the onset function.
- Parameters
event (
Event
object) – Light class to encapsulate information about an event, including origin time, location and waveform data.station (str) – Station name.
onset_data (
OnsetData
object) – Light class encapsulating data generated during onset calculation.picks_df (pandas.DataFrame object) – DataFrame that contains the measured picks with columns: [“Name”, “Phase”, “ModelledTime”, “PickTime”, “PickError”, “SNR”] Each row contains the phase pick from one station/phase.
traveltimes (list of float) – Modelled traveltimes from the event hypocentre to the station for each phase to be plotted.
run (
Run
object) – Light class encapsulating i/o path information for a given run.