Computing cross-correlation function?

前端 未结 4 1996
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 20:49

In R, I am using ccf or acf to compute the pair-wise cross-correlation function so that I can find out which shift gives me the maximu

4条回答
  •  一向
    一向 (楼主)
    2020-11-30 21:32

    To cross-correlate 1d arrays use numpy.correlate.

    For 2d arrays, use scipy.signal.correlate2d.

    There is also scipy.stsci.convolve.correlate2d.

    There is also matplotlib.pyplot.xcorr which is based on numpy.correlate.

    See this post on the SciPy mailing list for some links to different implementations.

    Edit: @user333700 added a link to the SciPy ticket for this issue in a comment.

提交回复
热议问题