| T O P I C R E V I E W |
| espenhjo |
Posted - 02/10/2004 : 06:39:12 AM Hi all! I need to do an FFT on a series of datasets, all having the same structure. For this have I tried to use the LabTalk script in the help file. The thing is that when I use this I don't get the correct FFT as when I select the FFT manually from the analysis menu in Origin. I use exactly the same parameters manually as in this script:
loop (i,1,9) { fft.reset(); fft.forward = 1; fft.forward.timeData$ = ekko00$(i)_A; fft.forward.tdelta = 2e-6; fft.forward.realData$ = ekko00$(i)_B; fft.forward.imagData$ = ekko00$(i)_C window -t W fft FFT00$(i)$; fft.output.samplingdata$ = FFT00$(i)_Freq; fft.output.realdata$ = FFT00$(i)_Real; fft.output.imagdata$ = FFT00$(i)_Imag; fft.output.ampdata$ = FFT00$(i)_r; fft.output.phasedata$ = FFT00$(i)_Phi; fft.output.powerdata$ = FFT00$(i)_Power; fft.start = 1; fft.real = 1; fft.normalize = 1; fft.shifted = 1; fft.windowing = 1; fft.spectrum = 1; fft.unwrap = 1; fft.convention = 1; fft.chkres(); fft.forward(); window -t P fftplot FFT00$(i)g; }
Any idea what could be wrong?
Regards, Espen
|
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 02/10/2004 : 08:14:02 AM Hi Espen,
Although the LabTalk FFT object works fine I have always found it to be much more complicated than is necessary for a simple FFT. If you're using Origin 7.0 or later I strongly suggest that you use the OriginC FFT function instead. But the only thing that I see wrong with your script is that fft.real should probably be zero since the input data are complex.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 02/10/2004 08:22:38 AM |
|
|