本文整理匯總了Python中obspy.core.stream.Stream.decimate方法的典型用法代碼示例。如果您正苦於以下問題:Python Stream.decimate方法的具體用法?Python Stream.decimate怎麽用?Python Stream.decimate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類obspy.core.stream.Stream
的用法示例。
在下文中一共展示了Stream.decimate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: max
# 需要導入模塊: from obspy.core.stream import Stream [as 別名]
# 或者: from obspy.core.stream.Stream import decimate [as 別名]
startaim = max([tr.stats.starttime for tr in (AC + RLAS)])
endtaim = min([tr.stats.endtime for tr in (AC + RLAS)])
AC.trim(startaim, endtaim, nearest_sample=True)
RLAS.trim(startaim, endtaim, nearest_sample=True)
# **Resample, Filter and Rotate**
# In[4]:
RLAS.decimate(factor=4)
AC.decimate(factor=4)
f_cutoff = 1.0
RLAS.filter('lowpass', freq=f_cutoff, corners=2, zerophase=True)
AC.filter('lowpass', freq=f_cutoff, corners=2, zerophase=True)
# event location from event info
source_latitude = event.origins[0].latitude
source_longitude = event.origins[0].longitude
# station location (Wettzell)
station_latitude = 49.144001
station_longitude = 12.8782
# theoretical backazimuth and distance
baz = gps2dist_azimuth(source_latitude, source_longitude, station_latitude, station_longitude)