Removed N_max parameter from function call

This commit is contained in:
Andreas Tsouchlos 2022-11-14 11:19:56 +01:00
parent 3e02dcf17c
commit 7bbe11e7aa

View File

@ -33,34 +33,34 @@ def plot_results():
def main(): def main():
# Path("sim_results").mkdir(parents=True, exist_ok=True) Path("sim_results").mkdir(parents=True, exist_ok=True)
#
# # used_code = "Hamming_7_4" used_code = "Hamming_7_4"
# # used_code = "Golay_24_12" # used_code = "Golay_24_12"
# used_code = "BCH_31_16" # used_code = "BCH_31_16"
# # used_code = "BCH_31_21" # used_code = "BCH_31_21"
# # used_code = "BCH_63_16" # used_code = "BCH_63_16"
#
# G = codes.Gs[used_code] G = codes.Gs[used_code]
# H = codes.get_systematic_H(G) H = codes.get_systematic_H(G)
#
# decoders = [ decoders = [
# maximum_likelihood.MLDecoder(G, H), maximum_likelihood.MLDecoder(G, H),
# proximal.ProximalDecoder(H, gamma=0.01), proximal.ProximalDecoder(H, gamma=0.01),
# proximal.ProximalDecoder(H, gamma=0.05), proximal.ProximalDecoder(H, gamma=0.05),
# proximal.ProximalDecoder(H, gamma=0.15) proximal.ProximalDecoder(H, gamma=0.15)
# ] ]
#
# k, n = G.shape k, n = G.shape
# SNRs, BERs = simulations.test_decoders(n, k, decoders, N_max=30000, target_frame_errors=100) SNRs, BERs = simulations.test_decoders(n, k, decoders, target_frame_errors=100)
#
# df = pd.DataFrame({"SNR": SNRs}) df = pd.DataFrame({"SNR": SNRs})
# df["BER_ML"] = BERs[0] df["BER_ML"] = BERs[0]
# df["BER_prox_0_01"] = BERs[0] df["BER_prox_0_01"] = BERs[1]
# df["BER_prox_0_05"] = BERs[1] df["BER_prox_0_05"] = BERs[2]
# df["BER_prox_0_15"] = BERs[2] df["BER_prox_0_15"] = BERs[3]
#
# df.to_csv(f"sim_results/{used_code}.csv") df.to_csv(f"sim_results/{used_code}.csv")
plot_results() plot_results()