irfft.py 文件源码

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

项目:orange-infrared 作者: markotoplak 项目源码 文件源码
def zero_fill(Ix, zff):
    """
    Zero-fill interferogram.
    Assymetric to prevent zpd from changing index.

    Args:
        Ix (np.array): 1D array with a single interferogram
        zff (int): Zero-filling factor

    Returns:
        Ix_zff: 1D array of Ix + zero fill
    """
    N = Ix.shape[0]
    # Calculate next power of two for DFT efficiency
    N_2 = int(np.exp2(np.ceil(np.log2(N))))
    # fill to N**2 * zff
    zero_fill = ((N_2 - N) + (N_2 * (zff)))
    Ix_zff = np.hstack((Ix, np.zeros(zero_fill)))
    return Ix_zff
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号