本文整理汇总了Python中obspy.core.stream.Stream.rotate方法的典型用法代码示例。如果您正苦于以下问题:Python Stream.rotate方法的具体用法?Python Stream.rotate怎么用?Python Stream.rotate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.core.stream.Stream
的用法示例。
在下文中一共展示了Stream.rotate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: gps2dist_azimuth
# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import rotate [as 别名]
station_longitude = 12.8782
# theoretical backazimuth and distance
baz = gps2dist_azimuth(source_latitude, source_longitude, station_latitude, station_longitude)
print('Epicentral distance [m]: ',baz[0])
print('Theoretical azimuth [deg]: ', baz[1])
print('Theoretical backazimuth [deg]: ', baz[2])
# rotate E-N component seismometer recordings to radial[1]-transverse[0] components using the theoretical BAz
AC_original = AC.copy()
#normalize
AC_original.normalize()
RLAS.normalize()
AC.normalize()
AC.rotate(method='NE->RT',back_azimuth=baz[2])
sampling_rate = int(RLAS[0].stats.sampling_rate)
time = np.linspace(0, len(AC[0].data)/sampling_rate,len(AC[0].data))
# **Estimate correlation coefficients for different time windows and estimate BAZ**
# In[5]:
TauPy_model = TauPyModel('ak135')
arrivals_p = TauPy_model.get_travel_times(distance_in_degree=0.001 * baz[0] / 111.11,
source_depth_in_km=event.origins[0].depth*0.001,
phase_list=["P","p","Pdiff","PP","PKiKP","PKIKP","Pn","Pg"])