02-01-2007 09:48 AM - edited 02-01-2007 09:48 AM
Message Edited by therealkilkenny on 02-01-2007 03:49 PM
02-01-2007 09:58 AM
02-01-2007 04:53 PM - edited 02-01-2007 04:53 PM
Message Edited by Q<UL on 02-01-2007 04:54 PM
02-01-2007 07:08 PM - edited 02-01-2007 07:08 PM
Q<UL wrote: ... I do not apply any window restriction of any sort to my data on LabView, but instead I only read the TXT files that contain the data and feed it to FFT.
Looking at the code you posted, I am pretty sure you're really applying a window before the FFT. Maybe things change if you wouldn't. 😮
(Of course it would be easier to see if the code were a bit cleaner. You have wires going in all direction! ;))
Message Edited by altenbach on 02-01-2007 05:10 PM
02-01-2007 07:58 PM - edited 02-01-2007 07:58 PM
Message Edited by altenbach on 02-01-2007 05:59 PM
02-01-2007 08:19 PM
02-01-2007 09:04 PM
02-02-2007 04:47 PM
for i in range(n):I wasn't overly careful in following the function calls, but it looks like this is the culprit. Because the python script is giving the results you expect I would suggest implementing this weighting function exactly in LabVIEW, then call the FFT without any additional windowing.
A = math.cos(i*math.pi/n) # Unity weighting on first point (ZPD)
Wt = A*A
YW.append(Wt)
YAV.append((YRAW[i] - Ymean)*Wt)
02-04-2007 10:58 AM
02-04-2007 10:46 PM
Ymean = sum(YRAW)/len(YRAW)
n = len(YRAW)
YW=[]; YAV = []
# Use Cos-squared weighting.
for i in range(n):
A = math.cos(i*math.pi/n) # Unity weighting on first point (ZPD)
Wt = A*A
YW.append(Wt)
YAV.append((YRAW[i] - Ymean)*Wt)