下面是包含许多列的 csv 文件的快照(实际文件非常大)。每列对应一个“系统状态”的时间戳值。我打算找到的是这些列出现的周期,即系统状态会重复自身以及以什么周期重复。我一直在 python 中寻找 fft2 ,但现在还不了解句号提取。请帮忙,因为我不是傅立叶变换的新手,也没有以前的知识。
一个矩阵在一列中表示。前两列用于矩阵单元识别。大多数值是零,但不是全部。
我的程序的算法步骤
import numpy as np
from numpy import fft
#there is mxn array where each column is a state of a system at increasing timestamps.
a=np.array([ [1,2,3,4], [11,12,13,14], [1,2,3,4,], [11,12,13,14], [1,2,3,4], [11,12,13,14] ])
#i have to find the periodicity of this np array where each column is a state of system. hence here state of the system repeats itself at period of 2.
#if array is as follows
a=np.array([ [1,2,3,4], [11,12,13,14],[2,4,6,8], [1,2,3,4,], [11,12,13,14],[2,4,6,8], [1,2,3,4], [11,12,13,14], [2,4,6,8] ])
#i look periods 3 ......if array is aperiodic I will look for an approximation to period of the array
#can numpy.fftpack is of use to me? can i achieve it using np.fft.fft2(a). I couldnot understand it thouroughly.