当前位置: 首页>>代码示例>>Python>>正文


Python Stream.plot方法代码示例

本文整理汇总了Python中obspy.core.stream.Stream.plot方法的典型用法代码示例。如果您正苦于以下问题:Python Stream.plot方法的具体用法?Python Stream.plot怎么用?Python Stream.plot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在obspy.core.stream.Stream的用法示例。


在下文中一共展示了Stream.plot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: merger

# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import plot [as 别名]
def merger(noise_trace, st_events_poisson, samp_rate, delta):
    """ Merges the noise with the events """
    # Creates the stream with the noise and events
    newnoise_t_formerging = noise_trace.slice(0, (st_events_poisson[-1].stats.endtime)+100)
    seis = Stream()
    seis += newnoise_t_formerging
    seis += st_events_poisson
    figs = plt.figure(figsize=(14,5))
    seis.plot(fig = figs)
    figs.suptitle("Noise and events", fontsize = 12)
    ylab=figs.text(0.05, 0.5, 'Amplitude of signal', va='center', 
                rotation='vertical', fontsize=12)
    figs.text(0.5, 0, 'Timestamp', ha='center', fontsize=12)
    seis.merge()
    seis += st_events_poisson
    seis.merge(method = 1, interpolation_samples=-1)
    figs = plt.figure(figsize=(14,5))
    seis.plot(fig = figs)
    plt.title("Synthetic seismogram", fontsize = 12)
    ylab=figs.text(0.05, 0.5, 'Amplitude of signal', va='center', 
                rotation='vertical', fontsize=12)
    figs.text(0.5, 0, 'Timestamp', ha='center', fontsize=12)

    syn_seis = seis[0]
    syn_seis.stats.sampling_rate = samp_rate
    syn_seis.stats.delta = delta
    
    return syn_seis
开发者ID:rclement1,项目名称:python,代码行数:30,代码来源:noisecodes.py

示例2: _plotResults

# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import plot [as 别名]
 def _plotResults(self):
     """
     Plots original, filtered original and real time processed traces into
     a single plot.
     """
     # plot only if test is started manually
     if __name__ != '__main__':
         return
     # create empty stream
     st = Stream()
     st.label = self._testMethodName
     # original trace
     self.orig_trace.label = "Original Trace"
     st += self.orig_trace
     # use header information of original trace with filtered trace data
     tr = self.orig_trace.copy()
     tr.data = self.filt_trace_data
     tr.label = "Filtered original Trace"
     st += tr
     # real processed chunks
     for i, tr in enumerate(self.rt_appended_traces):
         tr.label = "RT Chunk %02d" % (i + 1)
         st += tr
     # real time processed trace
     self.rt_trace.label = "RT Trace"
     st += self.rt_trace
     st.plot(automerge=False, color='blue', equal_scale=False)
开发者ID:gthompson,项目名称:obspy,代码行数:29,代码来源:test_signal.py

示例3: Files

# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import plot [as 别名]
from obspy.core.util import gps2DistAzimuth

host = 'http://examples.obspy.org/'
# Files (fmt: SAC)
files = ['TOK.2011.328.21.10.54.OKR01.HHN.inv',
'TOK.2011.328.21.10.54.OKR02.HHN.inv', 'TOK.2011.328.21.10.54.OKR03.HHN.inv',
'TOK.2011.328.21.10.54.OKR04.HHN.inv', 'TOK.2011.328.21.10.54.OKR05.HHN.inv',
'TOK.2011.328.21.10.54.OKR06.HHN.inv', 'TOK.2011.328.21.10.54.OKR07.HHN.inv',
'TOK.2011.328.21.10.54.OKR08.HHN.inv', 'TOK.2011.328.21.10.54.OKR09.HHN.inv',
'TOK.2011.328.21.10.54.OKR10.HHN.inv']
# Earthquakes' epicenter
eq_lat = 35.565
eq_lon = -96.792

# Reading the waveforms
st = Stream()
for waveform in files:
	st += read(host + waveform)

# Calculating distance from SAC headers lat/lon
# (trace.stats.sac.stla and trace.stats.sac.stlo)
for tr in st:
	tr.stats.distance = gps2DistAzimuth(tr.stats.sac.stla,
									tr.stats.sac.stlo, eq_lat, eq_lon)[0]
	# Setting Network name for plot title
	tr.stats.network = 'TOK'

st.filter('bandpass', freqmin=0.1, freqmax=10)
# Plot
st.plot(type='section', plot_dx=20e3, recordlength=100,
			time_down=True, linewidth=.25, grid_linewidth=.25)
开发者ID:Ciack404,项目名称:obspy,代码行数:33,代码来源:waveform_plotting_tutorial_6.py


注:本文中的obspy.core.stream.Stream.plot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。