1

Below is the snapshot of the csv file with many columns (Actual file is very large). Each column corresponds to a times-tamp value of a "system state". What i intend to find is the period of these columns occurrences ie will the system state repeat itself and with what period. I have been looking for fft2 in python , but by now not understanding the period extraction. Please help since I am not new to fourier transformation and no previous knowledge about it.

one matrix is represented in one column. First two columns are for matrix cell identification. Most of the values are zeros but not all.

enter image description here

algorithmic step of my program

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. 
Wasi Ahmad
  • 35,739
  • 32
  • 114
  • 161
Manish Bhanu
  • 53
  • 10

0 Answers0