GRC filter tap evaluations - difference between current version and v 0.7

Hi All,

With version 0.7 of GRC I could enter the taps of a filter in the
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
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
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
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.


It has to be evaluatable by the python parser.

map(lambda x: x/32768., [-23, 4, 245, 1235, 245, 4, -23])
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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs