discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] window code


From: Patrick Strasser
Subject: [Discuss-gnuradio] window code
Date: Thu, 28 Sep 2006 00:40:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050602 Thunderbird/1.0.2 Mnenhy/0.7.2.0

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]