Troubleshoot: FFT

I am getting an error message, "While executing FFT, the following error occurred: One or more of the input waves are not supported," when running the following script: 

string eyeName = testWave_eye[a]
artRemovalWaveName = "PDmm_"+eyeName+"_deBlinked_artRemoval"
wave artRemovalWave = $artRemovalWaveName
string artRemovalWave_postR1_FFTName = artRemovalWaveName+"_postR1_FFT"
wave artRemovalWave_postR1_FFT=$artRemovalWave_postR1_FFTName
FFT/OUT=2/DEST=artRemovalWave_postR1_FFT/RP=[600, 1085] artRemovalWave
DeletePoints 0,1, artRemovalWave_postR1_FFT
artRemovalWave_postR1_FFT = sqrt(artRemovalWave_postR1_FFT)

When I ran the FFT function in Command window on the same wave, it returned the right output. Any idea what was wrong with the script? 

Please let me know if you'd like me to submit the Igor file. 

Thanks, 

Judy

A few comments.

* Please edit your posting to put the code lines within one code block snippet rather than as individual lines. Indeed, we would be helped even more when you would post the function call that you are using to do this processing.

* The string expects a string, for example string eyeName = "testWave_eye"

* The second line should likely be prefaced with string (string artRemovalWaveName = ...)

 

The error message that you are reporting is normally a result of providing a non-numeric wave as the source wave for the FFT.

Thank you for getting back to me. I am not sure what you meant "one code block snippet", so I attached the entire function in pdf for you to review. The waves for FFT function are numerical. Please let me know if you'd like to see the Igor file. 

Thank you, 

Judy

code - FFT.pdf (70.91 KB)

I mean as below, where the code is in one block rather than each line in a block by itself

string eyeName = testWave_eye[a]
artRemovalWaveName = "PDmm_"+eyeName+"_deBlinked_artRemoval"
wave artRemovalWave = $artRemovalWaveName
string artRemovalWave_postR1_FFTName = artRemovalWaveName+"_postR1_FFT"
wave artRemovalWave_postR1_FFT=$artRemovalWave_postR1_FFTName
FFT/OUT=2/DEST=artRemovalWave_postR1_FFT/RP=[600, 1085] artRemovalWave
DeletePoints 0,1, artRemovalWave_postR1_FFT
artRemovalWave_postR1_FFT = sqrt(artRemovalWave_postR1_FFT)

 

I suggest you use Igor's debugger and "Debug on Error" to examine artRemovalWave 's actual wave type at the point of the error.

Also, take a look at these help topics:

DisplayHelpTopic "The Debugger"

DisplayHelpTopic "Debugging on Error"