iplv.py 文件源码

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

项目:dyfunconn 作者: makism 项目源码 文件源码
def estimate_pair(self, ts1, ts2):
        """

        Returns
        -------
        ts : array-like, shape(1, n_samples)
            Estimated iPLV time series.

        avg : float
            Average iPLV.


        Notes
        -----
        Called from :mod:`dyfunconn.tvfcgs.tvfcg`.
        """
        n_samples = len(ts1)

        ts_plv = np.exp(1j * (ts1 - ts2))
        avg_plv = np.abs(np.imag(np.sum((ts_plv))) / float(n_samples))

        return np.imag(ts_plv), avg_plv
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号