Built-in FFT routine suddenly returns NaNs
jp.long
I was repeatedly and successfully using the built-in Fourier Transforms dialog box available through the Analysis menu, when suddenly is stopped working, in the sense that the automatically generated graph was blank. When I use the Command Line to print out one of the points of the automatically generated FFT wave, it shows NaN.
It is likely that the input data contains one or more NaNs. An FFT for each point depends on all the input points, so if any point in the input is NaN you will get output that is all NaNs.
In the Data Browser (Data->Data Browser) find your input wave. Select it, and then click on the "Sigma" icon below the list of waves. If numNaNs is not zero, that is the problem.
April 26, 2022 at 02:02 pm - Permalink
In reply to It is likely that the input… by johnweeks
Thank you, John. That was the problem. I was doing FFTs between cursors, and getting good results, but moved the cursors to a range that happened to include a couple of NaNs, so the FFT "suddenly" stopped working. Good call.
April 26, 2022 at 04:23 pm - Permalink
It's a fairly common problem. On the face of it, it's surprising that a single NaN causes the entire output to be NaN. But that's how FFT works!
April 27, 2022 at 09:18 am - Permalink