Made main.py work with the new simulation functions

This commit is contained in:
2022-11-10 12:19:01 +01:00
parent f791a9a086
commit 2fae3ba3be
2 changed files with 22 additions and 45 deletions

View File

@@ -12,8 +12,6 @@ def get_noise_variance_from_SNR(SNR: float, n: int, k: int) -> float:
:param k: Length of a dataword of the used code
:return: Variance of the noise
"""
# noise_amp = (1 / np.sqrt(SNR_linear)) * signal_amp
SNR_linear = 10 ** (SNR / 10)
variance = 1 / (2 * (k/n) * SNR_linear)