diff --git a/python/demod.py b/python/demod.py index 7f0a0eb..f473118 100644 --- a/python/demod.py +++ b/python/demod.py @@ -98,7 +98,8 @@ def work(self, input_items, output_items): # bit being a 0 or 1. Confidence of 0 is equally likely 0 or 1. # Positive confidence levels are more likely 1 and negative values # are more likely 0. - self.bit_confidence = 10.0*np.log10(bit1_amps/bit0_amps) + with np.errstate(divide='ignore'): + self.bit_confidence = 10.0*(np.log10(bit1_amps)-np.log10(bit0_amps)) # Send PDU message to decoder meta = pmt.to_pmt({