Function to Obtain the length of Cycles from Fourier Transform