X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Fpython%2Fgnuradio%2Fblks2impl%2Fpfb_arb_resampler.py;h=cd9289fa5fbcdbc08e13f47070086b50e2d249bf;hb=6246efbefcdb6807daa7c245ebe7a975ab0ce7d4;hp=e40d9636ad8fdf9fdfc9e75c3703d732a13297a4;hpb=dd656e9db5e69ed6b11653deea710e299d72827e;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py index e40d9636..cd9289fa 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py @@ -31,15 +31,22 @@ class pfb_arb_resampler_ccf(gr.hier_block2): streams. This block is provided to be consistent with the interface to the other PFB block. ''' - def __init__(self, rate, taps, flt_size=32): + def __init__(self, rate, taps=None, flt_size=32, atten=80): gr.hier_block2.__init__(self, "pfb_arb_resampler_ccf", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature self._rate = rate - self._taps = taps self._size = flt_size + if taps is not None: + self._taps = taps + else: + # Create a filter that covers the full bandwidth of the input signal + bw = 0.5 + tb = 0.1 + self._taps = gr.firdes.low_pass_2(self._size, self._size, bw, tb, atten) + self.pfb = gr.pfb_arb_resampler_ccf(self._rate, self._taps, self._size) self.connect(self, self.pfb)