tiebenn.tools.visualization module

tiebenn.tools.visualization.epic_sta_plot()[source]

Generates a plot of the event’s epicenter and the stations with picks used for depth estimation with NonLinLoc.

tiebenn.tools.visualization.plot_assoc(ev_time, data, stations, picks, events, merged, mult_windows, secs_before)[source]

The visualization of the associated picks using PyOcto

Parameters:
  • ev_time (str) – Origin time of the event. Format: yyyy-mm-dd hh:mm:ss.ss

  • data (dict) – A dictionary with information about the stations with predicted picks

  • stations (pandas dataframe) – A dataframe with the coordinates and elevation for each station

  • picks (pandas dataframe) – Information for each predicted pick: station, phase (P or S), time and probability

  • events (pandas dataframe) – The event(s) to which PyOcto associated the picks

  • merged (pandas dataframe) – A single dataframe containing all the information for the associated picks

  • mult_windows (bool) – If picks were predicted in the multiple-windows-mode, then the code will name the output plots accordingly

  • secs_before (int) – Seconds before the event time to start retrieving waveforms, among other uses

Returns:

Figure in PDF format, stored in the saved_locations/<ev_time>_tiebenn_loc directory

Return type:

PhAssoc_event<event_number>.pdf

tiebenn.tools.visualization.plot_hypoc_confidence_ellipsoid()[source]

Generates a plot of the events location (maximum probability point), the probability density function (scatterplot) and the confidence ellipsoid as retrieved from the location with NonLinLoc.

Parameters:
  • None

  • NonLinLoc (because it works using files already produced during the location with)

Returns:

the confidence ellipsoid projected on the XY, XZ and YZ planes and depicting the PDF scatterplot, as well as a red star indicating the point of maximum probability (hypocenter) and the 3 68% confidence ellipsoids projected on each plane

Return type:

NLL_confidence_ellipsoid.pdf

tiebenn.tools.visualization.plot_picks4loc(data, streams)[source]

Generates a plot depicting all the stations sorted by epicentral distance with picks used for depth estimation with NonLinLoc

tiebenn.tools.visualization.plotpicks_sb(data, streams, starttime, predictions, picks)[source]

Generates a plot which includes time windows showing the waveforms on the different channels of a station used for wave detection. The identified P- and/or S-picks are shown as thicks. The probability function of the detected event and P- or S-picks is also plotted. This function is adapted to the outputs produced by the pickers in SeisBench.

Parameters:
  • data (dict) – A dictionary with station information

  • streams (ObsPy Stream) – An ObsPy strea with waveforms

  • starttime (str) – Origin time of the event. Format: yyyy-mm-dd hh:mm:ss.ss

  • predictions (dict) – A dictionary with the probability function for a detection, P- or S-wave on a given station, as obtained from the Annotate method implemented on SeisBench

  • picks (dict) – A dictionary with information and classification of P- or S-picks on each station, as obtained from the Classify method implemented on SeisBench

Returns:

Figures in PDF format, which are stored in the saved_locations/<ev_time>_tiebenn_loc directory

tiebenn.tools.visualization.plotpicks_sb_mw(data, streams, starttime, predictions, picks, picks_final)[source]

Generates a plot which includes time windows showing the waveforms on the different channels on a given station used for wave detection under the multiple time-window approach. The predicted P- and/or S-picks are shown as thicks: the ones used for the depth estimation are colored and the rest–obtained from predictions with other time offsets (and/or not associated to the event)– are shown thinner and in grey. The probability function of the P- or S-picks is also plotted in colored lines, while that obtained from predictions with other time offsets are in grey. This function is adapted to the outputs produced by the pickers in SeisBench.

Parameters:
  • data (dict) – A dictionary with station information

  • streams (ObsPy Stream) – The ObsPy streams for the station

  • starttime (str) – Origin time of the event. Format: yyyy-mm-dd hh:mm:ss.ss

  • predictions (dict) – A dictionary with the probability function for a detection, P- or S-wave on a given station, as obtained from the Annotate method implemented on SeisBench

  • picks (dict) – A dictionary with information and classification of P- or S-picks on each station, as obtained from the Classify method implemented on SeisBench

  • picks_final (dict) – picks after selecting for each station the time window with the best phase pick

Returns:

Figures in PDF format, which are stored in the saved_locations/<ev_time>_tiebenn_loc directory

tiebenn.tools.visualization.radar_factory(num_vars)[source]

Create a radar chart with num_vars Axes. This function creates a RadarAxes projection and registers it. Adapted from this example: https://matplotlib.org/stable/gallery/specialty_plots/radar_chart.html

Parameters:

num_vars (int) – Number of variables for radar chart.

Returns:

Polygon of <num_vars> sides.

tiebenn.tools.visualization.radarplot(event)[source]

Visualization of LQS metric using a radar plot, which illustrates the contribution of the 8 parameters defining the LQS value.

Parameters:

event (Pandas Dataframe) – Pandas dataframe with the 8 normalized parameters and the LQS value for a given event

Returns:

PDF figure of LQS metric in a radar plot.