5.10.1.12. eqcorrscan.utils.plotting.plot_synth_real¶
-
eqcorrscan.utils.plotting.
plot_synth_real
(real_template, synthetic, channels=False, save=False, savefile=None)[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.
- save (bool) False will plot to screen, true will save plot and not show to screen.
- savefile (str) Filename to save to, required for save=True
Returns: class: matplotlib.figure >>> 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.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 + 43, ... endtime=real[0].stats.starttime + 45).detrend('simple') >>> plot_synth_real(real_template=real, synthetic=synth)
(Source code, png, hires.png)