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_arb_resampler_ccf(self._rate, self._taps, self._size)
self.connect(self, self.pfb)
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.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._numchans)
self.pfb = gr.pfb_channelizer_ccf(self._numchans, self._taps,
self._oversample_rate)
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.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._decim)
self.pfb = gr.pfb_decimator_ccf(self._decim, self._taps, self._channel)
# 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
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)