plotting

Plotting for RT-EQcorrscan.

plotting.plot_buffer

Plotting for real-time seismic data.

class rt_eqcorrscan.plotting.plot_buffer.EQcorrscanPlot(rt_client, plot_length, tribe, inventory, detections, update_interval=100.0, plot_height=800, plot_width=1500, exclude_channels=(), offline=False, new_event_loop=True, **plot_data_options)[source]

Streaming bokeh plotting of waveforms.

Parameters
  • rt_client (_StreamingClient) – The real-time streaming client in use.

  • plot_length (float) – Plot length in seconds

  • tribe (RealTimeTribe) – Tribe of templates used in real-time detection

  • inventory (Inventory) – Inventory of stations used - will be plotted on the map.

  • detections (list) – List of eqcorrscan.core.match_filter.Detection

  • update_interval (float) – Update frequency of plot in ms

  • plot_height (int) – Plot height in screen units

  • plot_width (int) – Plot width in screen units

  • exclude_channels (iter) – Iterable of channel codes to exclude from plotting

  • offline (bool) – Flag to set time-stamps to data time-stamps if True, else timestamps will be real-time

background_run()[source]

run the plotting in a daemon thread.

background_stop()[source]

Stop the background plotting thread.

rt_eqcorrscan.plotting.plot_buffer.define_plot(doc, rt_client, channels, tribe, inventory, detections, map_options, plot_options, plot_length, update_interval, data_color='grey', lowcut=1.0, highcut=10.0, offline=False)[source]

Set up a bokeh plot for real-time plotting.

Defines a moving data stream and a map.

Parameters
  • doc (Document) – Bokeh document to edit - usually called as a partial

  • rt_client (_StreamingClient) – RealTimeClient streaming data

  • channels (list) – Channels to plot

  • tribe (RealTimeTribe) – Tribe to plot

  • inventory (Inventory) – Inventory to plot

  • detections (list) – Detections to plot - should be a list that is updated in place.

  • map_options (dict) – Dictionary of options for the map

  • plot_options (dict) – Dictionary of options for plotting in general

  • plot_length (float) – Length of data plot

  • update_interval (int) – Update frequency in seconds

  • data_color (str) – Colour to data stream

  • lowcut (float) – Lowcut for filtering data stream

  • highcut (float) – Highcut for filtering data stream

  • offline (bool) – Flag to set time-stamps to data time-stamps if True, else timestamps will be real-time

plotting.plot_event

Event plotting for RT-EQcorrscan.

rt_eqcorrscan.plotting.plot_event.plot_event(event, st, length=60.0, passband=(2, 10), size=(10.5, 10.5), show=True, fig=None)[source]

Plot the waveforms for an event with pick and calculated arrival times.

Return type

Figure

event

Event to plot

st

Obspy Stream for this event

length

Length to plot, from origin time

passband

Tuple of (lowcut, highcut) for filtering.

size

Figure size parsed to matplotlib.

show

Whether to show the figure or not.

fig

Figure to plot into.

Returns

Figure.