I have a spurious peak on my FFT of the signal from a light beam. The peak looks optical because when I block the beam the peaks goes away. Strangely its frequency depends on the frequency range. I also checked with a spectrum analyser, and the peak is not there.
It is probably related to the way I am doing the measurement, but I don't what is wrong. I attached some example files with settings.
It's probably just aliasing, which is to be expected if you have frequency content above half the FFT's sample rate. See this thread for examples and explanation: viewtopic.php?p=145832#p145832
If you could tell us about the frequency content of your signal, we could confirm.
Yes you are right, this is probably the reason, as we do have some higher frequencies. Thanks for your help, I will make sure the range and number of points are big enough. I guess that will sort it?
When analyzing a signal using an FFT, the best frequency resolution is achieved by setting the frequency span to the minimum necessary, thus increasing the sample period. The number of spectrum or frequency bins should be as large as possible, whilst maintaining acceptable acquisition performance.
Minimum necessary means high enough to cover the highest frequency in the signal being analyzed. The more samples you have, the longer duration the FFT record. And since FFT bandwidth is inversely proportional to record length, with more samples you'll get lower bandwidth (finer resolution). The reason you don't want to have any higher frequency span than necessary is that higher span means faster sample rate, and so you need more samples to achieve the record length required for a given bandwidth/resolution.
If you go to the View -> View Properties menu, the Spectrum Mode will show you many of these parameters.