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
评论列表
文章目录