Forum: GNU Radio GRC filter tap evaluations - difference between current version and v 0.7

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Richard C. (Guest)
on 2009-04-22 02:16
(Received via mailing list)
Hi All,

With version 0.7 of GRC I could enter the taps of a filter in the
following
format [-23, 4, 245, 1235, 245, 4, -23]/32768 in the relevant GRC block
window  (taps field) and GRC would do the division calculation for each
tap,
i.e the tap vector automatically became [-7.019e-4,1.22e-4, 7.47e-3,
3.76e-2, 7.47e-3, 1.22e-4, -7.019e-4].

Trying to do the same thing in the current version of GRC that is
included
with GNU Radio 3.2rc2 results in a warning message that the tap vector
cannot be evaluated. Does anyone know how to achieve the same thing as
demonstrated above for version 0.7?
A small thing I know but most coefficients of filters that I have come
as
fixed point 16 bit integers (-32768<=coeff<=32767) and doing a
copy/paste is
more convenient than doing the extra calculation and then formatting the
resultant floating point vector into a copy and pasteable form for entry
into the GRC blocks.

Thanks very much.

Cheers
Richard
Josh B. (Guest)
on 2009-04-22 02:58
(Received via mailing list)
It has to be evaluatable by the python parser.

map(lambda x: x/32768., [-23, 4, 245, 1235, 245, 4, -23])
or
numpy.array([-23, 4, 245, 1235, 245, 4, -23])/32768.

If you want to use the numpy, then make sure to include an import block
with the line: import numpy

-Josh
This topic is locked and can not be replied to.