Wave length & wave reference question
geologic
I'm wondering why this works.
Is it 1. Because the duplicate command didn't assign a wave reference? And what does that mean in this context? 2. The FFT will adjust the destination wave if neccesasry? 3. Something else?
function fbw(input, stepsize)
wave input
variable stepsize
string ftemp = nameofwave(input)+"_FFT"
duplicate/o input, $ftemp
wave f = $ftemp
FFT/OUT=3/DEST=f input
end
wave input
variable stepsize
string ftemp = nameofwave(input)+"_FFT"
duplicate/o input, $ftemp
wave f = $ftemp
FFT/OUT=3/DEST=f input
end
•FFT/out=3/Dest=foo ddd
•print numpnts(foo)
You should get: 210
The next curiosity is why you are bothering to create a wave for the destination? The whole idea for /DEST flag is to be used as above, i.e., you do not have to create the output before you execute the transform. If you specify a destination which already exists, it does not really matter how many points are in this wave. As long as you are not trying to pass a Text wave to /DEST, the wave is overwritten with the appropriate number of points for the transform. For a real wave input of N points, the transform is (1+N/2), which in this case is 1+209.
A.G.
WaveMetrics, Inc.
December 9, 2014 at 11:30 am - Permalink
December 9, 2014 at 12:22 pm - Permalink
December 9, 2014 at 12:24 pm - Permalink
Thank you, this answers my question. I just tried it with a complex transform, and it doesn't seem to matter if the destination was real...it becomes complex when the FFT command executes.
December 9, 2014 at 12:28 pm - Permalink