5.11.1.12. eqcorrscan.utils.plotting.plot_synth_real¶
-
eqcorrscan.utils.plotting.
plot_synth_real
(real_template, synthetic, channels=False, size=(5, 10), 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.
- size (tuple) Plot size.
- 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: >>> 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 + 43, ... endtime=real[0].stats.starttime + ... 45).detrend('simple') >>> plot_synth_real(real_template=real, synthetic=synth, ... size=(7, 4))
(Source code, png, hires.png)