[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 05/20: python3: update gr-analog for python
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 05/20: python3: update gr-analog for python3 support |
Date: |
Sun, 25 Dec 2016 03:59:57 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch python3
in repository gnuradio.
commit b425d428f369e34bef1b1bc21161dd111835fc8b
Author: Douglas Anderson <address@hidden>
Date: Thu Dec 22 12:50:25 2016 -0700
python3: update gr-analog for python3 support
---
gr-analog/python/analog/am_demod.py | 32 ++++++-------
gr-analog/python/analog/fm_emph.py | 72 +++++++++++++++--------------
gr-analog/python/analog/nbfm_rx.py | 14 +++---
gr-analog/python/analog/nbfm_tx.py | 22 +++++----
gr-analog/python/analog/standard_squelch.py | 10 ++--
gr-analog/python/analog/wfm_rcv.py | 6 +--
gr-analog/python/analog/wfm_rcv_fmdet.py | 34 +++++++-------
gr-analog/python/analog/wfm_rcv_pll.py | 28 +++++------
gr-analog/python/analog/wfm_tx.py | 14 +++---
9 files changed, 120 insertions(+), 112 deletions(-)
diff --git a/gr-analog/python/analog/am_demod.py
b/gr-analog/python/analog/am_demod.py
index 3459e82..365e063 100644
--- a/gr-analog/python/analog/am_demod.py
+++ b/gr-analog/python/analog/am_demod.py
@@ -39,22 +39,22 @@ class am_demod_cf(gr.hier_block2):
audio_stop: audio low pass filter stop frequency (float)
"""
def __init__(self, channel_rate, audio_decim, audio_pass, audio_stop):
- gr.hier_block2.__init__(self, "am_demod_cf",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(1, 1, gr.sizeof_float)) #
Input signature
+ gr.hier_block2.__init__(self, "am_demod_cf",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_float)) #
Input signature
- MAG = blocks.complex_to_mag()
- DCR = blocks.add_const_ff(-1.0)
+ MAG = blocks.complex_to_mag()
+ DCR = blocks.add_const_ff(-1.0)
- audio_taps = filter.optfir.low_pass(0.5, # Filter gain
- channel_rate, # Sample rate
- audio_pass, # Audio passband
- audio_stop, # Audio stopband
- 0.1, # Passband ripple
- 60) # Stopband
attenuation
- LPF = filter.fir_filter_fff(audio_decim, audio_taps)
+ audio_taps = filter.optfir.low_pass(0.5, # Filter gain
+ channel_rate, # Sample rate
+ audio_pass, # Audio passband
+ audio_stop, # Audio stopband
+ 0.1, # Passband ripple
+ 60) # Stopband attenuation
+ LPF = filter.fir_filter_fff(audio_decim, audio_taps)
- self.connect(self, MAG, DCR, LPF, self)
+ self.connect(self, MAG, DCR, LPF, self)
class demod_10k0a3e_cf(am_demod_cf):
"""
@@ -68,6 +68,6 @@ class demod_10k0a3e_cf(am_demod_cf):
audio_decim: input to output decimation rate (integer)
"""
def __init__(self, channel_rate, audio_decim):
- am_demod_cf.__init__(self, channel_rate, audio_decim,
- 5000, # Audio passband
- 5500) # Audio stopband
+ am_demod_cf.__init__(self, channel_rate, audio_decim,
+ 5000, # Audio passband
+ 5500) # Audio stopband
diff --git a/gr-analog/python/analog/fm_emph.py
b/gr-analog/python/analog/fm_emph.py
index bfa4742..bdd8d7d 100644
--- a/gr-analog/python/analog/fm_emph.py
+++ b/gr-analog/python/analog/fm_emph.py
@@ -19,6 +19,8 @@
# Boston, MA 02110-1301, USA.
#
+from __future__ import print_function
+
from gnuradio import gr, filter
import math
import cmath
@@ -132,8 +134,8 @@ class fm_deemph(gr.hier_block2):
# Since H(s = 0) = 1.0, then H(z = 1) = 1.0 and has 0 dB gain at DC
if 0:
- print "btaps =", btaps
- print "ataps =", ataps
+ print("btaps =", btaps)
+ print("ataps =", ataps)
global plot1
plot1 = gru.gnuplot_freqz(gru.freqz(btaps, ataps), fs, True)
@@ -149,11 +151,11 @@ class fm_deemph(gr.hier_block2):
# o------+ +-----+--------o
# | R1 | |
# +----/\/\/\/--+ \
-# /
+ # /
# \ R2
# /
# \
-# |
+ # |
# o--------------------------+--------o
#
# (This fine ASCII rendition is based on Figure 5-15
@@ -263,44 +265,44 @@ class fm_preemph(gr.hier_block2):
gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
- # Set fh to something sensible, if needed.
- # N.B. fh == fs/2.0 or fh == 0.0 results in a pole on the unit circle
- # at z = -1.0 or z = 1.0 respectively. That makes the filter unstable
- # and useless.
- if fh <= 0.0 or fh >= fs/2.0:
- fh = 0.925 * fs/2.0
+ # Set fh to something sensible, if needed.
+ # N.B. fh == fs/2.0 or fh == 0.0 results in a pole on the unit circle
+ # at z = -1.0 or z = 1.0 respectively. That makes the filter unstable
+ # and useless.
+ if fh <= 0.0 or fh >= fs/2.0:
+ fh = 0.925 * fs/2.0
- # Digital corner frequencies
- w_cl = 1.0 / tau
- w_ch = 2.0 * math.pi * fh
+ # Digital corner frequencies
+ w_cl = 1.0 / tau
+ w_ch = 2.0 * math.pi * fh
- # Prewarped analog corner frequencies
- w_cla = 2.0 * fs * math.tan(w_cl / (2.0 * fs))
- w_cha = 2.0 * fs * math.tan(w_ch / (2.0 * fs))
+ # Prewarped analog corner frequencies
+ w_cla = 2.0 * fs * math.tan(w_cl / (2.0 * fs))
+ w_cha = 2.0 * fs * math.tan(w_ch / (2.0 * fs))
- # Resulting digital pole, zero, and gain term from the bilinear
- # transformation of H(s) = (s + w_cla) / (s + w_cha) to
- # H(z) = b0 (1 - z1 z^-1)/(1 - p1 z^-1)
- kl = -w_cla / (2.0 * fs)
- kh = -w_cha / (2.0 * fs)
- z1 = (1.0 + kl) / (1.0 - kl)
- p1 = (1.0 + kh) / (1.0 - kh)
- b0 = (1.0 - kl) / (1.0 - kh)
+ # Resulting digital pole, zero, and gain term from the bilinear
+ # transformation of H(s) = (s + w_cla) / (s + w_cha) to
+ # H(z) = b0 (1 - z1 z^-1)/(1 - p1 z^-1)
+ kl = -w_cla / (2.0 * fs)
+ kh = -w_cha / (2.0 * fs)
+ z1 = (1.0 + kl) / (1.0 - kl)
+ p1 = (1.0 + kh) / (1.0 - kh)
+ b0 = (1.0 - kl) / (1.0 - kh)
- # Since H(s = infinity) = 1.0, then H(z = -1) = 1.0 and
- # this filter has 0 dB gain at fs/2.0.
- # That isn't what users are going to expect, so adjust with a
- # gain, g, so that H(z = 1) = 1.0 for 0 dB gain at DC.
- w_0dB = 2.0 * math.pi * 0.0
- g = abs(1.0 - p1 * cmath.rect(1.0, -w_0dB)) \
- / (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB)))
+ # Since H(s = infinity) = 1.0, then H(z = -1) = 1.0 and
+ # this filter has 0 dB gain at fs/2.0.
+ # That isn't what users are going to expect, so adjust with a
+ # gain, g, so that H(z = 1) = 1.0 for 0 dB gain at DC.
+ w_0dB = 2.0 * math.pi * 0.0
+ g = abs(1.0 - p1 * cmath.rect(1.0, -w_0dB)) \
+ / (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB)))
- btaps = [ g * b0 * 1.0, g * b0 * -z1 ]
- ataps = [ 1.0, -p1 ]
+ btaps = [ g * b0 * 1.0, g * b0 * -z1 ]
+ ataps = [ 1.0, -p1 ]
if 0:
- print "btaps =", btaps
- print "ataps =", ataps
+ print("btaps =", btaps)
+ print("ataps =", ataps)
global plot2
plot2 = gru.gnuplot_freqz(gru.freqz(btaps, ataps), fs, True)
diff --git a/gr-analog/python/analog/nbfm_rx.py
b/gr-analog/python/analog/nbfm_rx.py
index 38fbf80..6f1d38f 100644
--- a/gr-analog/python/analog/nbfm_rx.py
+++ b/gr-analog/python/analog/nbfm_rx.py
@@ -19,6 +19,8 @@
# Boston, MA 02110-1301, USA.
#
+from __future__ import print_function
+
import math
from gnuradio import gr
from gnuradio import filter
@@ -52,18 +54,18 @@ class nbfm_rx(gr.hier_block2):
audio_filter
"""
- gr.hier_block2.__init__(self, "nbfm_rx",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "nbfm_rx",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
# FIXME audio_rate and quad_rate ought to be exact rationals
self._audio_rate = audio_rate = int(audio_rate)
self._quad_rate = quad_rate = int(quad_rate)
if quad_rate % audio_rate != 0:
- raise ValueError, "quad_rate is not an integer multiple of
audio_rate"
+ raise ValueError("quad_rate is not an integer multiple of
audio_rate")
- squelch_threshold = 20 # dB
+ squelch_threshold = 20 # dB
#self.squelch = analog.simple_squelch_cc(squelch_threshold, 0.001)
# FM Demodulator input: complex; output: float
@@ -81,7 +83,7 @@ class nbfm_rx(gr.hier_block2):
0.5e3, # Transition band
filter.firdes.WIN_HAMMING) #
filter type
- print "len(audio_taps) =", len(audio_taps)
+ print("len(audio_taps) =", len(audio_taps))
# Decimating audio filter
# input: float; output: float; taps: float
diff --git a/gr-analog/python/analog/nbfm_tx.py
b/gr-analog/python/analog/nbfm_tx.py
index aa6c1ec..16f7dee 100644
--- a/gr-analog/python/analog/nbfm_tx.py
+++ b/gr-analog/python/analog/nbfm_tx.py
@@ -19,6 +19,8 @@
# Boston, MA 02110-1301, USA.
#
+from __future__ import print_function
+
import math
from gnuradio import gr, filter
from fm_emph import fm_preemph
@@ -46,16 +48,16 @@ class nbfm_tx(gr.hier_block2):
quad_rate must be an integer multiple of audio_rate.
"""
- gr.hier_block2.__init__(self, "nbfm_tx",
- gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
- gr.io_signature(1, 1, gr.sizeof_gr_complex)) #
Output signature
+ gr.hier_block2.__init__(self, "nbfm_tx",
+ gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_gr_complex)) #
Output signature
# FIXME audio_rate and quad_rate ought to be exact rationals
self._audio_rate = audio_rate = int(audio_rate)
self._quad_rate = quad_rate = int(quad_rate)
if quad_rate % audio_rate != 0:
- raise ValueError, "quad_rate is not an integer multiple of
audio_rate"
+ raise ValueError("quad_rate is not an integer multiple of
audio_rate")
do_interp = audio_rate != quad_rate
@@ -66,10 +68,10 @@ class nbfm_tx(gr.hier_block2):
quad_rate, # Fs
4500, # passband
cutoff
7000, # stopband
cutoff
- 0.1, # passband
ripple dB
+ 0.1, # passband
ripple dB
40) # stopband
atten dB
- #print "len(interp_taps) =", len(interp_taps)
+ #print("len(interp_taps) =", len(interp_taps))
self.interpolator = filter.interp_fir_filter_fff (interp_factor,
interp_taps)
self.preemph = fm_preemph(quad_rate, tau=tau, fh=fh)
@@ -90,10 +92,10 @@ class nbfm_tx(gr.hier_block2):
class ctcss_gen_f(gr.hier_block2):
def __init__(self, sample_rate, tone_freq):
- gr.hier_block2.__init__(self, "ctcss_gen_f",
- gr.io_signature(0, 0, 0), # Input
signature
- gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "ctcss_gen_f",
+ gr.io_signature(0, 0, 0), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
self.plgen = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE,
tone_freq, 0.1, 0.0)
- self.connect(self.plgen, self)
+ self.connect(self.plgen, self)
diff --git a/gr-analog/python/analog/standard_squelch.py
b/gr-analog/python/analog/standard_squelch.py
index 3ed9ebc..25656f8 100644
--- a/gr-analog/python/analog/standard_squelch.py
+++ b/gr-analog/python/analog/standard_squelch.py
@@ -26,9 +26,9 @@ from gnuradio import filter
class standard_squelch(gr.hier_block2):
def __init__(self, audio_rate):
- gr.hier_block2.__init__(self, "standard_squelch",
- gr.io_signature(1, 1, gr.sizeof_float), # Input
signature
- gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "standard_squelch",
+ gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
self.input_node = blocks.add_const_ff(0) # FIXME kludge
@@ -48,7 +48,7 @@ class standard_squelch(gr.hier_block2):
self.div = blocks.divide_ff()
self.squelch_mult = blocks.multiply_ff()
- self.connect(self, self.input_node)
+ self.connect(self, self.input_node)
self.connect(self.input_node, (self.squelch_mult, 0))
self.connect(self.input_node,self.low_iir)
@@ -66,7 +66,7 @@ class standard_squelch(gr.hier_block2):
self.connect(self.sub, (self.div, 0))
self.connect(self.add, (self.div, 1))
self.connect(self.div, self.gate, self.squelch_lpf,
(self.squelch_mult,1))
- self.connect(self.squelch_mult, self)
+ self.connect(self.squelch_mult, self)
def set_threshold(self, threshold):
self.gate.set_hi(threshold)
diff --git a/gr-analog/python/analog/wfm_rcv.py
b/gr-analog/python/analog/wfm_rcv.py
index d35d219..38374bf 100644
--- a/gr-analog/python/analog/wfm_rcv.py
+++ b/gr-analog/python/analog/wfm_rcv.py
@@ -40,9 +40,9 @@ class wfm_rcv(gr.hier_block2):
quad_rate: input sample rate of complex baseband input. (float)
audio_decimation: how much to decimate quad_rate to get to audio.
(integer)
"""
- gr.hier_block2.__init__(self, "wfm_rcv",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "wfm_rcv",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_float)) #
Output signature
volume = 20.
diff --git a/gr-analog/python/analog/wfm_rcv_fmdet.py
b/gr-analog/python/analog/wfm_rcv_fmdet.py
index b7cd145..1946c82 100644
--- a/gr-analog/python/analog/wfm_rcv_fmdet.py
+++ b/gr-analog/python/analog/wfm_rcv_fmdet.py
@@ -43,11 +43,11 @@ class wfm_rcv_fmdet(gr.hier_block2):
demod_rate: input sample rate of complex baseband input. (float)
audio_decimation: how much to decimate demod_rate to get to audio.
(integer)
"""
- gr.hier_block2.__init__(self, "wfm_rcv_fmdet",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(2, 2, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "wfm_rcv_fmdet",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
+ gr.io_signature(2, 2, gr.sizeof_float)) #
Output signature
lowfreq = -125e3/demod_rate
- highfreq = 125e3/demod_rate
+ highfreq = 125e3/demod_rate
audio_rate = demod_rate / audio_decimation
# We assign to self so that outsiders can grab the demodulator
@@ -127,12 +127,12 @@ class wfm_rcv_fmdet(gr.hier_block2):
#print "stereo dsbsc filter ", stereo_dsbsc_filter_coeffs
# construct overlap add filter system from coefficients for stereo
carrier
- self.rds_signal_filter = \
+ self.rds_signal_filter = \
filter.fir_filter_fcc(audio_decimation,
stereo_rds_filter_coeffs)
- self.rds_carrier_generator = blocks.multiply_cc();
- self.rds_signal_generator = blocks.multiply_cc();
- self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
+ self.rds_carrier_generator = blocks.multiply_cc();
+ self.rds_signal_generator = blocks.multiply_cc();
+ self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
loop_bw = 2*math.pi/100.0
max_freq = -2.0*math.pi*18990/audio_rate;
@@ -191,21 +191,21 @@ class wfm_rcv_fmdet(gr.hier_block2):
#send it to negative side of a subtracter
self.connect(self.LmR_real,(self.Make_Right,1))
- # Make rds carrier by taking the squared pilot tone and
- # multiplying by pilot tone
- self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
+ # Make rds carrier by taking the squared pilot tone and
+ # multiplying by pilot tone
+ self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
self.connect(self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1))
- # take signal, filter off rds, send into mixer 0 channel
-
self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
+ # take signal, filter off rds, send into mixer 0 channel
+
self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
# take rds_carrier_generator output and send into mixer 1
# channel
-
self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
+
self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
- # send basebanded rds signal and send into "processor"
- # which for now is a null sink
- self.connect(self.rds_signal_generator,self_rds_signal_processor)
+ # send basebanded rds signal and send into "processor"
+ # which for now is a null sink
+ self.connect(self.rds_signal_generator,self_rds_signal_processor)
if 1:
diff --git a/gr-analog/python/analog/wfm_rcv_pll.py
b/gr-analog/python/analog/wfm_rcv_pll.py
index 282e2b1..adbd4b9 100644
--- a/gr-analog/python/analog/wfm_rcv_pll.py
+++ b/gr-analog/python/analog/wfm_rcv_pll.py
@@ -42,9 +42,9 @@ class wfm_rcv_pll(gr.hier_block2):
demod_rate: input sample rate of complex baseband input. (float)
audio_decimation: how much to decimate demod_rate to get to audio.
(integer)
"""
- gr.hier_block2.__init__(self, "wfm_rcv_pll",
- gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(2, 2, gr.sizeof_float)) #
Output signature
+ gr.hier_block2.__init__(self, "wfm_rcv_pll",
+ gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
+ gr.io_signature(2, 2, gr.sizeof_float)) #
Output signature
bandwidth = 250e3
audio_rate = demod_rate / audio_decimation
@@ -120,12 +120,12 @@ class wfm_rcv_pll(gr.hier_block2):
#print "stereo dsbsc filter ", stereo_dsbsc_filter_coeffs
# construct overlap add filter system from coefficients for stereo
carrier
- self.rds_signal_filter = \
+ self.rds_signal_filter = \
filter.fir_filter_fcc(audio_decimation,
stereo_rds_filter_coeffs)
- self.rds_carrier_generator = blocks.multiply_cc();
- self.rds_signal_generator = blocks.multiply_cc();
- self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
+ self.rds_carrier_generator = blocks.multiply_cc();
+ self.rds_signal_generator = blocks.multiply_cc();
+ self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
loop_bw = 2*math.pi/100.0
max_freq = -2.0*math.pi*18990/audio_rate;
@@ -169,15 +169,15 @@ class wfm_rcv_pll(gr.hier_block2):
#take the same real part of the DSBSC baseband signal and send it
to negative side of a subtracter
self.connect(self.LmR_real,(self.Make_Right,1))
- # Make rds carrier by taking the squared pilot tone and multiplying
by pilot tone
- self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
+ # Make rds carrier by taking the squared pilot tone and
multiplying by pilot tone
+ self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
self.connect(self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1))
- # take signal, filter off rds, send into mixer 0 channel
-
self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
+ # take signal, filter off rds, send into mixer 0 channel
+
self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
# take rds_carrier_generator output and send into mixer 1 channel
-
self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
- # send basebanded rds signal and send into "processor" which for
now is a null sink
- self.connect(self.rds_signal_generator,self_rds_signal_processor)
+
self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
+ # send basebanded rds signal and send into "processor" which for
now is a null sink
+ self.connect(self.rds_signal_generator,self_rds_signal_processor)
if 1:
diff --git a/gr-analog/python/analog/wfm_tx.py
b/gr-analog/python/analog/wfm_tx.py
index a1b5893..91fdb2d 100644
--- a/gr-analog/python/analog/wfm_tx.py
+++ b/gr-analog/python/analog/wfm_tx.py
@@ -19,6 +19,8 @@
# Boston, MA 02110-1301, USA.
#
+from __future__ import print_function
+
import math
from gnuradio import gr
from gnuradio import filter
@@ -46,16 +48,16 @@ class wfm_tx(gr.hier_block2):
quad_rate must be an integer multiple of audio_rate.
"""
- gr.hier_block2.__init__(self, "wfm_tx",
- gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
- gr.io_signature(1, 1, gr.sizeof_gr_complex)) #
Output signature
+ gr.hier_block2.__init__(self, "wfm_tx",
+ gr.io_signature(1, 1, gr.sizeof_float), #
Input signature
+ gr.io_signature(1, 1, gr.sizeof_gr_complex)) #
Output signature
# FIXME audio_rate and quad_rate ought to be exact rationals
audio_rate = int(audio_rate)
quad_rate = int(quad_rate)
if quad_rate % audio_rate != 0:
- raise ValueError, "quad_rate is not an integer multiple of
audio_rate"
+ raise ValueError("quad_rate is not an integer multiple of
audio_rate")
do_interp = audio_rate != quad_rate
@@ -66,10 +68,10 @@ class wfm_tx(gr.hier_block2):
quad_rate, # Fs
16000, # passband
cutoff
18000, # stopband
cutoff
- 0.1, # passband
ripple dB
+ 0.1, # passband
ripple dB
40) # stopband
atten dB
- print "len(interp_taps) =", len(interp_taps)
+ print("len(interp_taps) =", len(interp_taps))
self.interpolator = filter.interp_fir_filter_fff (interp_factor,
interp_taps)
self.preemph = fm_preemph(quad_rate, tau=tau, fh=fh)
- [Commit-gnuradio] [gnuradio] branch python3 created (now 23af6b8), git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 12/20: python3: update gr-trellis for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 01/20: volk: update submodule to latest master, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 15/20: python3: update gr-vocoder for python support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 19/20: python3: use site instead of distutils, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 20/20: python3: futurize misplaced __future__ import, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 05/20: python3: update gr-analog for python3 support,
git <=
- [Commit-gnuradio] [gnuradio] 06/20: python3: update gr-blocks python files for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 08/20: python3: update gr-dtv for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 02/20: python3: add cmake support for python3 at top level, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 17/20: python3: fix issues detected by futurize, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 16/20: python3: update gr-zeromq for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 11/20: python3: update gr-qtgui for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 13/20: python3: update gr-uhd for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 04/20: python3: update gnuradio-runtime for python3 support, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 03/20: python3: update doxygen files to build docs with python3, git, 2016/12/24
- [Commit-gnuradio] [gnuradio] 09/20: python3: update gr-fec for python3 support, git, 2016/12/24