obspy.segy.benchmark.plotBenchmark

plotBenchmark(sufiles, normalize='traces', clip_partial_traces=True, scale=3.0, xmin=None, xmax=None, ymin=None, ymax=None, fig=None, plot_legend=True, title='', size=(800, 600), dpi=100, outfile=None, format=None, trim_to_smallest_trace=True)[source]

Plot a benchmark plot from given SU files.

Parameters:
  • sufiles (List of SU file names or SUFile objects.) SU files to plot.
  • normalize (None, 'stream' or 'traces', optional) If 'stream' is given it will normalize per stream. The keyword 'traces' normalizes all traces in all streams. None will skip normalization. Defaults to 'traces'.
  • clip_partial_traces (bool, optional) Clips traces which are not completely plotted. Defaults to True.
  • trim_to_smallest_trace (bool, optional) Trims all traces to shortest available trace. Defaults to True.
  • plot_legend (bool, optional) If enabled plots a legend generated by given SU files. Defaults to True.
  • title (string, optional) Plots a title if given. Disabled by default.
  • scale (float, optional) Scales all amplitudes by this factor. Defaults to 3.0.
  • xmin (float, optional) Minimum of time axis.
  • xmax (float, optional) Maximum of time axis.
  • ymin (float, optional) Minimum of offset axis.
  • ymax (float, optional) Maximum of offset axis.
  • fig (matplotlib.figure.Figure) Use an existing matplotlib figure instance. Default to None.
  • size (tuple, optional) Size tuple in pixel for the output file. This corresponds to the resolution of the graph for vector formats. Defaults to (800, 800) pixel.
  • dpi (int, optional) Dots per inch of the output file. This also affects the size of most elements in the graph (text, linewidth, ...). Defaults to 100.
  • outfile (string, optional) Output file name. Also used to automatically determine the output format. Supported file formats depend on your matplotlib backend. Most backends support png, pdf, ps, eps and svg. Defaults to None.
  • format (string, optional) Format of the graph picture. If no format is given the outfile parameter will be used to try to automatically determine the output format. If no format is found it defaults to png output. If no outfile is specified but a format is, than a binary imagestring will be returned. Defaults to None.

New in version 0.5.1.

Example

The following example plots four seismic unix files in one benchmark image.

>>> import glob
>>> sufiles = glob.glob('seismic01_*_vz.su')
>>> from obspy.segy.benchmark import plotBenchmark
>>> plotBenchmark(sufiles, title="Homogenous halfspace")  

[hires.png, pdf]

../../_images/54b42c538d.png

This Page