rotate.py 文件源码

python
阅读 49 收藏 0 点赞 0 评论 0

项目:pytomo3d 作者: computational-seismology 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号