fft_correlator.py 文件源码

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

项目:pypiv 作者: jr7 项目源码 文件源码
def _evaluate_windows(self, window_a, window_b):
        """
        Calculate the FFT of both windows, correlate and transform back.

        In order to decrease the error a mean subtraction is performed.
        To compensate for the indexing during the FFT a FFT Shift is performed.

        :param window_a: interrogation window
        :param window_b: search window
        :returns: correlation window
        """
        fft_a = self._fa_fft(window_a - np.mean(window_a))
        fft_b = self._fb_fft(window_b - np.mean(window_b))

        fft_corr  = fft_a*np.conj(fft_b)
        inv_fft = self._ift_fft(fft_corr)
        return np.fft.fftshift(inv_fft)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号