def one_time_from_two_time(two_time_corr):
"""
This will provide the one-time correlation data from two-time
correlation data.
Parameters
----------
two_time_corr : array
matrix of two time correlation
shape (number of labels(ROI's), number of frames, number of frames)
Returns
-------
one_time_corr : array
matrix of one time correlation
shape (number of labels(ROI's), number of frames)
"""
one_time_corr = np.zeros((two_time_corr.shape[0], two_time_corr.shape[2]))
for g in two_time_corr:
for j in range(two_time_corr.shape[2]):
one_time_corr[:, j] = np.trace(g, offset=j)/two_time_corr.shape[2]
return one_time_corr
评论列表
文章目录