From a6baad020124e4ef12ee4f62add7c6022f919719 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Thu, 10 Nov 2022 10:24:24 +0100 Subject: [PATCH] Comment changes --- sw/utility/simulations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sw/utility/simulations.py b/sw/utility/simulations.py index 9ed9141..2c1d618 100644 --- a/sw/utility/simulations.py +++ b/sw/utility/simulations.py @@ -53,10 +53,13 @@ def test_decoder(x: np.array, leave=False, bar_format="{l_bar}{bar}| {n_fmt}/{total_fmt}"): + # Simulate channel y = noise.add_awgn(x_bpsk, SNR, signal_amp=np.sqrt(2)) + # Decode received frame x_hat = decoder.decode(y) + # Calculate statistics total_bit_errors += count_bit_errors(x, x_hat) total_bits += x.size total_frame_errors += 1 if total_bit_errors > 0 else 0