projects
/
debian
/
gnuradio
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Under extreme circumstances, optfir might never produce an answer (atten>300), so...
[debian/gnuradio]
/
gnuradio-core
/
src
/
python
/
gnuradio
/
blks2impl
/
pfb_interpolator.py
diff --git
a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py
b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py
index a210e3de82c53409144174ab93d1d5f7bb7e2c97..a6094f7f459f871352be2843a0ec8af54b2c0552 100644
(file)
--- a/
gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py
+++ b/
gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py
@@
-45,7
+45,7
@@
class pfb_interpolator_ccf(gr.hier_block2):
# Create a filter that covers the full bandwidth of the input signal
bw = 0.4
tb = 0.2
# Create a filter that covers the full bandwidth of the input signal
bw = 0.4
tb = 0.2
- ripple = 0.
1
+ ripple = 0.
99
made = False
while not made:
try:
made = False
while not made:
try:
@@
-56,6
+56,10
@@
class pfb_interpolator_ccf(gr.hier_block2):
made = False
print("Warning: set ripple to %.4f dB. If this is a problem, adjust the attenuation or create your own filter taps." % (ripple))
made = False
print("Warning: set ripple to %.4f dB. If this is a problem, adjust the attenuation or create your own filter taps." % (ripple))
+ # Build in an exit strategy; if we've come this far, it ain't working.
+ if(ripple >= 1.0):
+ raise RuntimeError("optfir could not generate an appropriate filter.")
+
self.pfb = gr.pfb_interpolator_ccf(self._interp, self._taps)
self.connect(self, self.pfb)
self.pfb = gr.pfb_interpolator_ccf(self._interp, self._taps)
self.connect(self, self.pfb)