def check_vertical_inventory_sanity(tr, inventory):
"""
Check the inventory of vertical(Z) component, check
if the abs(dip) is 90 and azimuth is 0.
"""
if tr.stats.channel[-1] != "Z":
raise ValueError("Function only checks vertical(Z) component(%s)"
% tr.stats.channel)
dip, azi = extract_channel_orientation(tr, inventory)
if dip is None or azi is None:
return False
if np.isclose(abs(dip), 90.0) and np.isclose(abs(azi), 0.0):
return True
else:
return False
评论列表
文章目录