uwt_align.py 文件源码

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

项目:PySAT 作者: USGS-Astrogeology 项目源码 文件源码
def uwt_align_d4(X, inverse=False):
    """UWT d4 coefficients aligment.

    If inverse = True performs the misalignment
    for a correct reconstruction.
    """
    J = X.shape[0] / 2
    w_shifts = np.asarray([(3 * 2 ** j) - 1 for j in range(J)])
    v_shifts = np.asarray([1] + [(2 ** (j + 1) - 1) for j in range(1, J)])

    if not inverse:
        w_shifts *= -1
        v_shifts *= -1

    for j in range(J):
        X[j] = np.roll(X[j], w_shifts[j])
        X[j + J] = np.roll(X[j + J], v_shifts[j])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号