5.2.10.10. eqcorrscan.utils.plotting.plot_synth_real¶
- eqcorrscan.utils.plotting.plot_synth_real(real_template, synthetic, channels=False, **kwargs)[source]¶
Plot multiple channels of data for real data and synthetic.
- Parameters:
real_template (obspy.core.stream.Stream) – Stream of the real template
synthetic (obspy.core.stream.Stream) – Stream of synthetic template
channels (list) – List of tuples of (station, channel) to plot, default is False, which plots all.
title (str) – Title of figure
show (bool) – Whether to show the figure or not (defaults to True)
save (bool) – Whether to save the figure or not (defaults to False)
savefile (str) – Filename to save figure to, if save==True (defaults to “EQcorrscan_figure.png”)
return_figure (bool) – Whether to return the figure or not (defaults to True), if False then the figure will be cleared and closed.
size (tuple of float) – Figure size as (width, height) in inches. Defaults to (10.5, 7.5)
- Returns:
>>> from obspy import read, Stream, Trace >>> from eqcorrscan.utils.synth_seis import seis_sim >>> from eqcorrscan.utils.plotting import plot_synth_real >>> real = read() >>> synth = Stream(Trace(seis_sim(sp=100, flength=200))) >>> synth[0].stats.station = 'RJOB' >>> synth[0].stats.channel = 'EHZ' >>> synth[0].stats.sampling_rate = 100 >>> synth = synth.filter('bandpass', freqmin=2, freqmax=8) >>> real = real.select( ... station='RJOB', channel='EHZ').detrend('simple').filter( ... 'bandpass', freqmin=2, freqmax=8) >>> real = real.trim( ... starttime=real[0].stats.starttime + 4.9, ... endtime=real[0].stats.starttime + 6.9).detrend('simple') >>> plot_synth_real(real_template=real, synthetic=synth, ... size=(7, 4))