[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: [Discuss-gnuradio] can't read fir taps
From:       Nemanja Savic <vlasinac () gmail ! com>
Date:       2014-01-30 13:39:37
Message-ID: CAFD_UOcwwEWJJFz-qeOPxs-S6sfnX5avqCwgYJvmOetwhnbD3g () mail ! gmail ! com
[Download RAW message or body]

Thank you Tom. It works when using fir from filter module.


On Thu, Jan 30, 2014 at 2:10 PM, Tom Rondeau <tom@trondeau.com> wrote:

> On Thu, Jan 30, 2014 at 4:47 AM, Nemanja Savic <vlasinac@gmail.com> wrote:
> > After a few more tries to figure out how this works I realized that
> method
> > taps() can return list of coefficients only if set_taps was called before
> > for setting taps. In the constructor of filter set_taps is not called,
> so my
> > question is which taps does filter use?
>
> It uses those taps, but it looks like it doesn't set a variable inside
> to hold them until you call set_taps on it. The fir filter blocks
> encapsulate another fir kernel, which is where the real taps are
> actually stored. When you create your FIR filter, the taps are being
> set correctly.
>
> You should switch to using filter.fir_filter, which exists in 3.6.5.1.
> It will help future-proof you when moving up GNU Radio versions.
> Getting the taps here right after creating the filter will work fine
> in this implementation.
>
> Tom
>
>
> > On Wed, Jan 29, 2014 at 6:54 PM, Nemanja Savic <vlasinac@gmail.com>
> wrote:
> >>
> >> Hi all guys,
> >>
> >> this two lines of code sort of doesn't work as I expect.
> >>
> >> self.channel_filter = gr.fir_filter_ccf(1, firdes.low_pass(10,
> samp_rate,
> >> 80000, 5000, firdes.WIN_HAMMING, 6.76))
> >>
> >> print self.channel_filter.taps(), self.channel_filter
> >>
> >> I use 3.6.5.1 version and the only thing I get is empty tuple.
> >>
> >> What might be the problem?
> >>
> >> Best and thank you,
> >>
> >> --
> >> Nemanja Savić
> >
> >
> >
> >
> > --
> > Nemanja Savić
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
>



-- 
Nemanja Savić

[Attachment #3 (text/html)]

<div dir="ltr">Thank you Tom. It works when using fir from filter \
module.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, \
Jan 30, 2014 at 2:10 PM, Tom Rondeau <span dir="ltr">&lt;<a \
href="mailto:tom@trondeau.com" target="_blank">tom@trondeau.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div class="im">On Thu, Jan 30, 2014 at 4:47 AM, Nemanja \
Savic &lt;<a href="mailto:vlasinac@gmail.com">vlasinac@gmail.com</a>&gt; wrote:<br>

&gt; After a few more tries to figure out how this works I realized that method<br>
&gt; taps() can return list of coefficients only if set_taps was called before<br>
&gt; for setting taps. In the constructor of filter set_taps is not called, so my<br>
&gt; question is which taps does filter use?<br>
<br>
</div>It uses those taps, but it looks like it doesn&#39;t set a variable inside<br>
to hold them until you call set_taps on it. The fir filter blocks<br>
encapsulate another fir kernel, which is where the real taps are<br>
actually stored. When you create your FIR filter, the taps are being<br>
set correctly.<br>
<br>
You should switch to using filter.fir_filter, which exists in 3.6.5.1.<br>
It will help future-proof you when moving up GNU Radio versions.<br>
Getting the taps here right after creating the filter will work fine<br>
in this implementation.<br>
<br>
Tom<br>
<div class="im"><br>
<br>
&gt; On Wed, Jan 29, 2014 at 6:54 PM, Nemanja Savic &lt;<a \
href="mailto:vlasinac@gmail.com">vlasinac@gmail.com</a>&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt; Hi all guys,<br>
&gt;&gt;<br>
&gt;&gt; this two lines of code sort of doesn&#39;t work as I expect.<br>
&gt;&gt;<br>
&gt;&gt; self.channel_filter = gr.fir_filter_ccf(1, firdes.low_pass(10, \
samp_rate,<br> &gt;&gt; 80000, 5000, firdes.WIN_HAMMING, 6.76))<br>
&gt;&gt;<br>
&gt;&gt; print self.channel_filter.taps(), self.channel_filter<br>
&gt;&gt;<br>
&gt;&gt; I use 3.6.5.1 version and the only thing I get is empty tuple.<br>
&gt;&gt;<br>
&gt;&gt; What might be the problem?<br>
&gt;&gt;<br>
&gt;&gt; Best and thank you,<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Nemanja Savić<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Nemanja Savić<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; Discuss-gnuradio mailing list<br>
&gt; <a href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org</a><br>
&gt; <a href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" \
target="_blank">https://lists.gnu.org/mailman/listinfo/discuss-gnuradio</a><br> \
&gt;<br> </blockquote></div><br><br clear="all"><br>-- <br>Nemanja Savić
</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic