3.5. quakemigrate.plot¶
The quakemigrate.plot module provides methods for the generation of
figures in QuakeMigrate, including:
- Event summaries
- Phase pick summaries
- Triggered event summaries
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
3.5.1. quakemigrate.plot.event¶
Module containing methods to generate event summaries and videos.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.plot.event.event_summary(run, event, marginal_coalescence, lut, xy_files=None)[source]¶ Plots an event summary illustrating the locate results: slices through the marginalised coalescence with the location estimates (best-fitting spline to interpolated coalescence; Gaussian fit; covariance fit) and associated uncertainties; a gather of the filtered station data, sorted by distance from the event; and the maximum coalescence through time.
Parameters: - run (
Runobject) – Light class encapsulating i/o path information for a given run. - event (
Eventobject) – Light class encapsulating signal, onset, and location information for a given event. - marginal_coalescence (~numpy.ndarray of ~numpy.double) – Marginalised 3-D coalescence map, shape(nx, ny, nz).
- lut (
LUTobject) – Contains the traveltime lookup tables for seismic phases, computed for some pre-defined velocity model. - xy_files (str, optional) –
Path to comma-separated value file (.csv) containing a series of coordinate files to plot. Columns: [“File”, “Color”, “Linewidth”, “Linestyle”], where “File” is the absolute path to the file containing the coordinates to be plotted. E.g: “/home/user/volcano_outlines.csv,black,0.5,-“. Each .csv coordinate file should contain coordinates only, with columns: [“Longitude”, “Latitude”]. E.g.: “-17.5,64.8”. Lines pre-pended with
#will be treated as a comment - this can be used to include references. See the Volcanotectonic_Iceland example XY_files for a template.Note
Do not include a header line in either file.
- run (
3.5.2. quakemigrate.plot.phase_picks¶
Module to produce a summary plot for the phase picking.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.plot.phase_picks.pick_summary(event, station, signal, picks, onsets, ttimes, window)[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 (str) – Unique identifier for the event.
- station (str) – Station code.
- signal (numpy.ndarray of int) – Seismic data for the Z N and E components.
- 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.
- onsets (numpy.ndarray of float) – Onset functions for each seismic phase, shape(nstations, nsamples).
- ttimes (list, [int, int]) – Modelled phase travel times.
- window (list, [int, int]) – Indices specifying the window within which the pick was made.
Returns: fig – Figure showing basic phase picking information.
Return type: matplotlib.Figure object
3.5.3. quakemigrate.plot.trigger¶
Module to plot the triggered events on a decimated grid.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.plot.trigger.trigger_summary(events, starttime, endtime, run, marginal_window, min_event_interval, detection_threshold, normalise_coalescence, lut, data, region, savefig, discarded_events, xy_files=None)[source]¶ Plots the data from a .scanmseed file with annotations illustrating the trigger results: event triggers and marginal windows on the coalescence traces, and map and cross section view of the gridded triggered earthquake locations.
Parameters: - events (pandas.DataFrame) – Triggered events information, columns: [“EventID”, “CoaTime”, “TRIG_COA”, “COA_X”, “COA_Y”, “COA_Z”, “MinTime”, “MaxTime”, “COA”, “COA_NORM”].
- starttime (obspy.UTCDateTime) – Start time of trigger run.
- endtime (obspy.UTCDateTime) – End time of trigger run.
- run (
Runobject) – Light class encapsulating i/o path information for a given run. - marginal_window (float) – Estimate of time error over which to marginalise the coalescence.
- min_event_interval (float) – Minimum time interval between triggered events.
- detection_threshold (array-like) – Coalescence value above which to trigger events.
- normalise_coalescence (bool) – If True, use coalescence normalised by the average background noise.
- lut (
LUTobject) – Contains the traveltime lookup tables for P- and S-phases, computed for some pre-defined velocity model. - data (pandas.DataFrame) – Data output by detect() – decimated scan, columns [“COA”, “COA_N”, “X”, “Y”, “Z”]
- region (list) – Geographical region within which earthquakes have been triggered.
- savefig (bool) – Output the plot as a file. The plot is shown by default, and not saved.
- discarded_events (pandas.DataFrame) – Discarded triggered events information, columns: [“EventID”, “CoaTime”, “TRIG_COA”, “COA_X”, “COA_Y”, “COA_Z”, “MinTime”, “MaxTime”, “COA”, “COA_NORM”].
- xy_files (str, optional) –
Path to comma-separated value file (.csv) containing a series of coordinate files to plot. Columns: [“File”, “Color”, “Linewidth”, “Linestyle”], where “File” is the absolute path to the file containing the coordinates to be plotted. E.g: “/home/user/volcano_outlines.csv,black,0.5,-“. Each .csv coordinate file should contain coordinates only, with columns: [“Longitude”, “Latitude”]. E.g.: “-17.5,64.8”. Lines pre-pended with
#will be treated as a comment - this can be used to include references. See the Volcanotectonic_Iceland example XY_files for a template.Note
Do not include a header line in either file.