Forum: GNU Radio gr_firdes_bandpass()

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.
Marcus D. Leech (Guest)
on 2009-05-13 23:41
(Received via mailing list)
I don't understand why this is failing:

Traceback (most recent call last):
  File "./top_block.py", line 184, in <module>
    tb = top_block(options)
  File "./top_block.py", line 97, in __init__
    1, bw, -7.0, 7.0, 150, firdes.WIN_HAMMING, 6.76))
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_py_general.py",
line 2729, in band_pass
    return _gnuradio_swig_py_general.firdes_band_pass(*args, **kwargs)
IndexError: gr_firdes check failed: 0 < fa <= sampling_freq / 2


When I specify negative frequencies, it does this.

I thought that with a complex filter, I could specify negative
frequency?

This particular filter is a decimating filter that is decminating from
500KHz sample rate down to 32KHz sample rate,
  with cutoff between -7KHz and +7KHz.   But I'm triggering this error,
and I don't understand why.  This is from
  a GRC flow-graph.

--
Marcus L.
Principal Investigator, Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org
Eric B. (Guest)
on 2009-05-13 23:54
(Received via mailing list)
On Wed, May 13, 2009 at 03:40:31PM -0400, Marcus D. Leech wrote:
>     return _gnuradio_swig_py_general.firdes_band_pass(*args, **kwargs)
> and I don't understand why.  This is from
>   a GRC flow-graph.
>

Just use a low pass (0 .. 7k). No need for the bandpass.
firdes_band_pass (and the lowpass for that matter) design real filters
coeffs that you can use with gr.fir_filter_ccf.

Eric
This topic is locked and can not be replied to.