Comment changes
This commit is contained in:
parent
a6849a1f7d
commit
a6baad0201
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user