I have to use FFT to determine the period of waves inside a signal. After applying FFT on a window of 10000 point from a signal, I get something like this:
What I don't understand is that FFT is supposed to return frequencies, but if the input is a longer signal with the same frequencies, the values of frequencies returned by FFT will change.
So for an array of N length, the result of the FFT will always be N/2 (after removing the symmetric part), how do I interpret these return values to get the period of the major frequency?
I use the fft
function provided by scipy in python.
Edit:
Some answers pointed out the sampling frequency. I don't understand what the number of samples per second has to do with the size of the periodic pattern, the FFT
returns frequencies right? And then for a specified frequency f, I can do t=1/f
and then t
will be something like 300 points for example. That means we have a repeating pattern every 300 point, I'm not sure about this. To summaries I have a periodic signal and I need to identify the period T0
fftfreq
to get the frequencies: docs.scipy.org/doc/scipy-dev/reference/generated/… $\endgroup$