[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 11/13: filter: fixed default filter for rat
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 11/13: filter: fixed default filter for rational_resampler. |
Date: |
Thu, 4 Dec 2014 16:21:51 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch maint
in repository gnuradio.
commit 464f23ae4eba3230c54b68d783a3ab7b4734744c
Author: Tom Rondeau <address@hidden>
Date: Tue Dec 2 18:01:41 2014 -0500
filter: fixed default filter for rational_resampler.
Addresses issue #745. When rate < 1 (downsampling), take into account the
amount of downsampling (decimation) and adjust the LPF's passband to reduce
aliasing.
---
gr-digital/lib/constellation.cc | 2 +-
.../digital/qa_constellation_soft_decoder_cf.py | 2 +-
gr-digital/python/digital/soft_dec_lut_gen.py | 2 +-
gr-filter/python/filter/rational_resampler.py | 33 ++++++++++++++--------
4 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc
index b17635f..a477aa8 100644
--- a/gr-digital/lib/constellation.cc
+++ b/gr-digital/lib/constellation.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2012 Free Software Foundation, Inc.
+ * Copyright 2010-2012,2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
diff --git a/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
b/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
index 448e76e..872aed0 100644
--- a/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
+++ b/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
diff --git a/gr-digital/python/digital/soft_dec_lut_gen.py
b/gr-digital/python/digital/soft_dec_lut_gen.py
index 9c184d6..5bea27f 100644
--- a/gr-digital/python/digital/soft_dec_lut_gen.py
+++ b/gr-digital/python/digital/soft_dec_lut_gen.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
diff --git a/gr-filter/python/filter/rational_resampler.py
b/gr-filter/python/filter/rational_resampler.py
index 8f1dc36..32246a0 100644
--- a/gr-filter/python/filter/rational_resampler.py
+++ b/gr-filter/python/filter/rational_resampler.py
@@ -40,16 +40,25 @@ def design_filter(interpolation, decimation, fractional_bw):
if fractional_bw >= 0.5 or fractional_bw <= 0:
raise ValueError, "Invalid fractional_bandwidth, must be in (0, 0.5)"
- beta = 5.0
- trans_width = 0.5 - fractional_bw
- mid_transition_band = 0.5 - trans_width/2
-
+ beta = 7.0
+ halfband = 0.5
+ rate = float(interpolation)/float(decimation)
+ if(rate >= 1.0):
+ trans_width = halfband - fractional_bw
+ mid_transition_band = halfband - trans_width/2.0
+ else:
+ trans_width = rate*(halfband - fractional_bw)
+ mid_transition_band = rate*halfband - trans_width/2.0
+
+ print trans_width, mid_transition_band
taps = filter.firdes.low_pass(interpolation, # gain
- 1, # Fs
- mid_transition_band/interpolation, # trans
mid point
- trans_width/interpolation, #
transition width
+ interpolation, # Fs
+ mid_transition_band, # trans
mid point
+ trans_width, #
transition width
filter.firdes.WIN_KAISER,
beta) # beta
+
+ print len(taps)
return taps
@@ -90,13 +99,15 @@ class _rational_resampler_base(gr.hier_block2):
if taps is None:
taps = design_filter(interpolation, decimation, fractional_bw)
- resampler = resampler_base(interpolation, decimation, taps)
+ self.resampler = resampler_base(interpolation, decimation, taps)
gr.hier_block2.__init__(self, "rational_resampler",
- gr.io_signature(1, 1,
resampler.input_signature().sizeof_stream_item(0)),
- gr.io_signature(1, 1,
resampler.output_signature().sizeof_stream_item(0)))
+ gr.io_signature(1, 1,
self.resampler.input_signature().sizeof_stream_item(0)),
+ gr.io_signature(1, 1,
self.resampler.output_signature().sizeof_stream_item(0)))
- self.connect(self, resampler, self)
+ self.connect(self, self.resampler, self)
+ def taps(self):
+ return self.resampler.taps()
class rational_resampler_fff(_rational_resampler_base):
def __init__(self, interpolation, decimation, taps=None,
fractional_bw=None):
- [Commit-gnuradio] [gnuradio] branch maint updated (689f507 -> ec05c9b), git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 05/13: Merge remote-tracking branch 'st0ne/maint' into maint, git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 02/13: modified the qa tests to the correct values., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 01/13: Corrected the fast_atan2f function. Recalculated the table and corrected some errors in the code. Error before correction: <0.111 degrees. Error after correction: <8.20E-5 degrees Some QA tests failed after correcting fast_atan2f function. The tests were also fixed., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 04/13: Checking for NaN takes too much time. With some incompatibility to cmath atan2 for some NaN/Inf combinations the performance is better now. This change should not have any impact in SDR related things. It is only for checking NaN/Inf values., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 13/13: logger: fixed a problem with the Python loggers not respecting the log_file and debug_file settings in the logger preferences file., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 07/13: runtime: math: reset a QA test for the fast_atan2f for mixed nan/inf input., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 06/13: runtime: math: in fast_atan2f, moved nested if that checks for divide by zero out into its own check., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 08/13: qtgui: compare current time domain x-axis unit with new unit to ensure time scale update., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 03/13: cleaned the code, git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 11/13: filter: fixed default filter for rational_resampler.,
git <=
- [Commit-gnuradio] [gnuradio] 12/13: filter: adds documentation to using the rational resamplers., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 09/13: digital: fixes issues with the constellation soft decoder, specifically how the decisions are calculated in the C++ code and some issues with the QAM16 constellation in particular., git, 2014/12/04
- [Commit-gnuradio] [gnuradio] 10/13: digtial: adding example to explore the constellation decoder and soft decoder for different constellations., git, 2014/12/04