07-30-2010 04:22 PM
I want to perform a FFT on a waveform that describes a Gaussian pulse in amplitude vs. time. I also want to have that pulse centered so that its maximum is at t = 0.
So far I have been using Amplitude and Phase Spectrum.vi and FFT Spectrum (Mag-Phase).vi. The problem with the former is that it only takes a 1D array of Y values, not another array for time values. The problem with FFT Spectrum (Mag-Phase).vi is that I don't know how to use the t0 component (it requires a timestamp?).
I have tried "wrapping" the pulse around, i.e. cutting the first half of the pulse and concatenating it to the end but this doesn't have the FFT I want (which would have constant phase in frequency domain).
A bit about my background: I'm an undergrad volunteering in an ultrafast spectroscopy lab, so it's very possible I'm ignoring something very elementary here about FFT, which I still treat as something of a black box, so any help in that topic would be welcome.
08-02-2010 12:17 PM
Hello,
In the Amplitude and Phase Spectrum vi, the time values are accounted for by wiring the dt input of the function. This assumes that you have a constant dt between each point and the very first point is treated as t=0. The other function behaves similarly except that you are using a waveform. A waveform consists of 1) Amplitude values, 2) t0 (timestamp - for you, the timestamp can just be an arbitrary constant value) 3) dt (again, this make it a constant dt between all the points) 4) Attributes. Overall, you should get similar results from either of these. In terms of your data, do they have a constant time interval between points or not?
-Zach
08-02-2010 12:58 PM
derada,
Look up the translation property of a Fourier transform. A time shift of Tp (which is what you want to do) translates to a complex phase shift of exp(-2*pi*i*Tp*f). All LV FFT functions work on arrays with indexes starting at zero, so you need to keep track of the shifts separately.
Lynn