diff options
author | Josh Blum | 2011-07-28 17:02:58 -0700 |
---|---|---|
committer | Josh Blum | 2011-07-28 17:02:58 -0700 |
commit | 8bc1c4dc5a8d31594e8768a10e05b4b0172e733e (patch) | |
tree | fcb957028a108ca719a6cb879e7d62713b35ba1c /gr-digital/python/generic_mod_demod.py | |
parent | 8c824bf2e3e6758aff05ee4b5f4d3f106a13c672 (diff) | |
parent | 8b3c4ccf922c602ae77dad7f3911b16bdd0112d3 (diff) | |
download | gnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.tar.gz gnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.tar.bz2 gnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.zip |
Merge branch 'digital' of https://github.com/trondeau/gnuradio into digital
Conflicts:
gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h
gnuradio-core/src/lib/general/gr_constellation_decoder_cb.h
gnuradio-core/src/lib/general/gr_costas_loop_cc.h
gnuradio-core/src/lib/general/gr_lms_dfe_cc.h
gnuradio-core/src/lib/general/gr_lms_dfe_ff.h
gr-digital/lib/Makefile.am
gr-digital/lib/digital_binary_slicer_fb.h
gr-digital/lib/digital_clock_recovery_mm_cc.h
gr-digital/lib/digital_clock_recovery_mm_ff.h
gr-digital/lib/digital_correlate_access_code_bb.h
gr-digital/lib/digital_crc32.h
gr-digital/lib/digital_mpsk_receiver_cc.h
gr-digital/python/Makefile.am
gr-digital/python/__init__.py
gr-digital/python/generic_mod_demod.py
gr-digital/python/pkt.py
gr-digital/python/psk2.py
gr-digital/python/qam.py
Diffstat (limited to 'gr-digital/python/generic_mod_demod.py')
-rw-r--r-- | gr-digital/python/generic_mod_demod.py | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gr-digital/python/generic_mod_demod.py b/gr-digital/python/generic_mod_demod.py index f8051db0a..1b8603fea 100644 --- a/gr-digital/python/generic_mod_demod.py +++ b/gr-digital/python/generic_mod_demod.py @@ -27,7 +27,6 @@ Generic modulation and demodulation. from gnuradio import gr from modulation_utils2 import extract_kwargs_from_options_for_class -#from gnuradio.digital.utils import mod_codes from utils import mod_codes import digital_swig @@ -106,12 +105,10 @@ class generic_mod(gr.hier_block2): self._samples_per_symbol = samples_per_symbol self._excess_bw = excess_bw self._differential = differential - - if not isinstance(self._samples_per_symbol, int) or self._samples_per_symbol < 2: - raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol) - - ntaps = 11 * self._samples_per_symbol + if self._samples_per_symbol < 2: + raise TypeError, ("sbp must be >= 2, is %d" % self._samples_per_symbol) + arity = pow(2,self.bits_per_symbol()) # turn bytes into k-bit vectors @@ -127,14 +124,15 @@ class generic_mod(gr.hier_block2): self.chunks2symbols = gr.chunks_to_symbols_bc(self._constellation.points()) # pulse shaping filter - self.rrc_taps = gr.firdes.root_raised_cosine( - self._samples_per_symbol, # gain (samples_per_symbol since we're - # interpolating by samples_per_symbol) - self._samples_per_symbol, # sampling rate - 1.0, # symbol rate - self._excess_bw, # excess bandwidth (roll-off factor) + nfilts = 32 + ntaps = nfilts * 11 * int(self._samples_per_symbol) # make nfilts filters of ntaps each + self.rrc_taps = gr.firdes.root_raised_cosine( + nfilts, # gain + nfilts, # sampling rate based on 32 filters in resampler + 1.0, # symbol rate + self._excess_bw, # excess bandwidth (roll-off factor) ntaps) - self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, + self.rrc_filter = gr.pfb_arb_resampler_ccf(self._samples_per_symbol, self.rrc_taps) # Connect @@ -255,8 +253,8 @@ class generic_demod(gr.hier_block2): self._timing_max_dev=timing_max_dev self._differential = differential - if not isinstance(self._samples_per_symbol, int) or self._samples_per_symbol < 2: - raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol) + if self._samples_per_symbol < 2: + raise TypeError, ("sbp must be >= 2, is %d" % self._samples_per_symbol) arity = pow(2,self.bits_per_symbol()) @@ -279,7 +277,6 @@ class generic_demod(gr.hier_block2): taps, nfilts, nfilts/2, self._timing_max_dev) self.time_recov.set_beta(self._timing_beta) - #self._phase_beta = 0.25 * self._phase_alpha * self._phase_alpha self._phase_beta = 0.25 * self._phase_alpha * self._phase_alpha fmin = -0.25 fmax = 0.25 |