Importing filter taps from file (GRC 3.7.1)

Can someone help me to discover why I am not able to import filter taps
from file?

In the attached example, that I am running on GR 3.7.1, I
try to import filter taps from a file (via variable_0) or just typing
some taps (via variable_1).

In the first case I get the following error:

Traceback (most recent call last):
File “/home/piero/top_block.py”, line 74, in
tb = top_block()
File “/home/piero/top_block.py”, line 37, in init
self.fir_filter_xxx_0 = filter.fir_filter_fff(1, (variable_0))
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/filter/filter_swig.py”,
line 1154, in make
return _filter_swig.fir_filter_fff_make(*args, **kwargs)
TypeError: in method ‘fir_filter_fff_make’, argument 2 of type
‘std::vector< float,std::allocator< float > > const &’

I am not able to “decode” the error message.

If I import variable_1 taps everything is OK.

The difference between the two mode seems to be missing commas between
values.

Thank you in advance

Piero

I tested your code in GR 3.6.5.1 and I get the same error message. I’m
surprised becouse everithing seems to be right.

http://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioCompanion

Could anybody help?

Ilaria

I found a workaround!!!

I saved the taps as a text file, with entries delimited by a space (by
the way my taps are +1 or -1).

Then I used numpy.genfromtxt(‘filename’,dtype=“float”, delimiter=" ")
directly within the filter dialog or via a variable.

However I am curious to discover why the approach that uses
numpy.fromfile, as indicated in GR manuals, do not work.

regards

Piero

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