tiebenn.tools.gammaasoc module
- tiebenn.tools.gammaasoc.phase_association(outputs, data, velmod, ev_lon, ev_lat, ev_time, max_dist, plot, mult_windows, secs_before)[source]
Phase association using GaMMA (https://github.com/AI4EPS/GaMMA). The function receives as input the predicted phase picks obtained from SeisBench (PhaseNet/EQTransformer) and uses a machine-learning model to predict which of them correspond to a certain event.
NOTE: A future development for this function could be the case where the phase association yields more than one event, not originally detected by the AD-Detector. In this case, additional outputs would be required to account for eventual new events
- Parameters:
outputs (dict) – The predicted phases/arrival times obtained from SeisBench for each station
data (dict) – A dictionary with information regarding the stations on which picks were predicted
velmod (int) – The velocity model used for phase association
ev_lon (float) – Longitude of the located event
ev_lat (float) – Latitude of the located event
ev_time (str) – yyyy-mm-dd hh:mm:ss.ss
plot (bool) – If true, it will plot the detected event(s) and the corresponding associated picks
mult_windows (bool) – If picks were predicted in the multiple-windows-mode, then the code will name de output plots accordingly
secs_before (int) – Seconds before the event time to start retrieving waveforms, among other uses
- Returns:
A dictionary with all the predicted events and their associated phases in a pandas dataframe PhAssoc_event<event_number>.pdf: A visualization of the associated picks
- Return type:
events_assoc (dict)