Merge branch 'master' into udp
[debian/gnuradio] / gnuradio-core / src / python / gnuradio / window.py
index f89831375bac56a3a1210619431c4a6177a784fe..e109a98920300a14df862e5fede79fd21cd27b93 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -166,7 +166,7 @@ def kaiser(fft_size,beta):
 def coswindow(coeffs):
     def closure(fft_size):
         window = [0] * fft_size
-        print list(enumerate(coeffs))
+        #print list(enumerate(coeffs))
         for w_index in range(fft_size):
             for (c_index, coeff) in enumerate(coeffs):
                 window[w_index] += (-1)**c_index * coeff * math.cos(2.0*c_index*math.pi*(w_index+0.5)/(fft_size-1))
@@ -177,3 +177,4 @@ blackmanharris = coswindow((0.35875,0.48829,0.14128,0.01168))
 nuttall = coswindow((0.3635819,0.4891775,0.1365995,0.0106411))  # Wikipedia calls this Blackman-Nuttall
 nuttall_cfd = coswindow((0.355768,0.487396,0.144232,0.012604)) # Wikipedia calls this Nuttall, continuous first deriv
 flattop = coswindow((1.0,1.93,1.29,0.388,0.032)) # Flat top window, coeffs from Wikipedia
+rectangular = lambda fft_size: [1]*fft_size