Hello!
I'm trying the code from gr.window. For the blackmanharris window
everthing works fine:
>>> from gnuradio import window
>>> window.blackmanharris(3)
[0.21746999999999997, 0.21747000000000014, 0.21746999999999989]
but bartlett has problems findeing midn:
>>> window.bartlett(7)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/gnuradio/window.py", line 91,
in bartlett
for index in xrange(midn(fft_size)+1):
NameError: global name 'midn' is not defined
The code for bartlett is:
def bartlett(fft_size):
mfrq = freq(fft_size)
angle = 0
window = [0 for i in range(fft_size)]
j = fft_size-1
for index in xrange(midn(fft_size)+1):
window[j] = window[index] = angle
angle += freq
j -= 1
return window
window.midm1 and window.midp1 exist, though.
Bit rot?
Patrick
--
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at tugraz dot at>
Student of Telematik, Techn. University Graz, Austria
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio