Detecting Periodicity with the Discrete Fourier Transform