Added timer and changed simulation params
This commit is contained in:
parent
9348689292
commit
e6a7c39f50
@ -2,6 +2,7 @@ import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import seaborn as sns
|
||||
import pandas as pd
|
||||
from timeit import default_timer as timer
|
||||
|
||||
from decoders import proximal
|
||||
from decoders import naive_soft_decision
|
||||
@ -44,15 +45,21 @@ def main():
|
||||
SNRs = np.linspace(1, 8, 9)
|
||||
data = pd.DataFrame({"SNR": SNRs})
|
||||
|
||||
start_time = timer()
|
||||
|
||||
for decoder_name in decoders:
|
||||
decoder = decoders[decoder_name]
|
||||
_, BERs_sd = utility.test_decoder(encoder=encoder,
|
||||
decoder=decoder,
|
||||
d=d,
|
||||
SNRs=SNRs)
|
||||
SNRs=SNRs,
|
||||
N_max=2000)
|
||||
|
||||
data[f"BER_{decoder_name}"] = BERs_sd
|
||||
|
||||
stop_time = timer()
|
||||
print(f"Elapsed time: {stop_time - start_time:2f}")
|
||||
|
||||
# Plot results
|
||||
|
||||
sns.set_theme()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user