discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Error trying to load FFT filter taps


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Error trying to load FFT filter taps
Date: Sun, 20 Apr 2014 12:37:49 -0400

On Sun, Apr 20, 2014 at 12:24 PM, Tom McDermott <address@hidden> wrote:
Thanks, Tom   that solved the problem.

numpy.fromfile('filename', numpy.complex64).tolist()

Should the gnuradio wiki (GRC) text be updated?

Apologies for the triple posting, first two attempts were using yahoo.com mail account, got
bit by the yahoo DMARC problem and dumped from the list. Changed to gmail to avoid the problem.

-- Tom, N5EG

Absolutely update the wiki page with helpful tips like this. Which page in particular are you referring to?

Tom
 


 
On Sun, Apr 20, 2014 at 8:44 AM, Tom Rondeau <address@hidden> wrote:
On Sat, Apr 19, 2014 at 1:27 PM, Tom McDermott <address@hidden> wrote:
Am getting the following error when trying to run a GRC flowgraph that loads FFT filter taps from an external file. The type filter parameter is set to complex->complex (complex taps).
The flow graph has imported numpy.  The taps are loaded using:

numpy.fromfile('/home/tom/Desktop/EchoScreencaps/chirp-down-20-20-131072', numpy.complex64)

as the taps parameter.  What does the error below mean?

GRC: v3.7.4git-101-g76970d54
Ubuntu 13.10
top_block.py is attached.

-- Tom, N5EG


Traceback (most recent call last):
  File "/home/tom/Desktop/EchoScreencaps/top_block.py", line 173, in <module>
    tb = top_block()
  File "/home/tom/Desktop/EchoScreencaps/top_block.py", line 115, in __init__
    self.fft_filter_xxx_0 = filter.fft_filter_ccc(1, (numpy.fromfile('/home/tom/Desktop/EchoScreencaps/chirp-down-20-20-131072', numpy.complex64)), 1)
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/filter/filter_swig.py", line 1329, in make
    return _filter_swig.fft_filter_ccc_make(*args, **kwargs)
TypeError: in method 'fft_filter_ccc_make', argument 2 of type 'std::vector< gr_complex,std::allocator< gr_complex > > const &'


Tom,

This is a conflict between the numpy array data type and swig. Call the .tolist() function on the array passed back from numpy and it should work.

Tom
 



reply via email to

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