-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplot_results.py
607 lines (552 loc) · 52.5 KB
/
plot_results.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
import argparse
import numpy as np
import matplotlib.pyplot as plt
import os
from scipy import signal as sg
#plt.rcParams.update({
#"text.usetex": True,
#"font.family": "sans-serif",
#"font.sans-serif": ["Helvetica"],
#'font.size': 20})
from data_lib import params_linear_2D #, params_linear
#from data_lib import params_circular #, params_linear
def plot2pgf(temp, filename, folder='./'):
"""
:param temp: list of equally-long data
:param filename: filename without extension nor path
:param folder: folder where to save
"""
if not os.path.exists(folder):
os.makedirs(folder)
np.savetxt(os.path.join(folder, filename + '.txt'), np.asarray(temp).T, fmt="%f", encoding='ascii')
def main():
# Arguments parse
parser = argparse.ArgumentParser(description='Generate data for linear array setup')
parser.add_argument('--dataset_path', type=str, help="Base Data Directory", default='/nas/home/ralessandri/thesis_project/dataset/')
#parser.add_argument('--dataset_path', type=str, help="Base Data Directory", default='C:/Users/rales/OneDrive/Desktop/POLIMI/TESI/dataset/test/')
parser.add_argument('--array_type', type=str, help="Array Configuration", default='linear')
parser.add_argument('--n_loudspeakers', type=int, help='number missing loudspeakers',
default=64)
args = parser.parse_args()
array_type = args.array_type
print("array_type = {} ".format(array_type))
nmse = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmse_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAbs = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAbs_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAngle = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAngle_nl_' + str(args.n_loudspeakers)+'.npz'))
ssim = np.load(os.path.join(args.dataset_path, array_type+'_array', 'ssim_nl_' + str(args.n_loudspeakers)+'.npz'))
ac = np.load(os.path.join(args.dataset_path, array_type+'_array', 'ac_nl_' + str(args.n_loudspeakers)+'.npz'))
nmse_B = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmse_B_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAbs_B = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAbs_B_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAngle_B = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAngle_B_nl_' + str(args.n_loudspeakers)+'.npz'))
ssim_B = np.load(os.path.join(args.dataset_path, array_type+'_array', 'ssim_B_nl_' + str(args.n_loudspeakers)+'.npz'))
nmse_D = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmse_D_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAbs_D = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAbs_D_nl_' + str(args.n_loudspeakers)+'.npz'))
nmseAngle_D = np.load(os.path.join(args.dataset_path, array_type+'_array', 'nmseAngle_D_nl_' + str(args.n_loudspeakers)+'.npz'))
ssim_D = np.load(os.path.join(args.dataset_path, array_type+'_array', 'ssim_D_nl_' + str(args.n_loudspeakers)+'.npz'))
nmse_pwd_cnn, nmse_pm, nmse_acc, nmse_am = np.real(nmse['nmse_pwd_cnn']), np.real(nmse['nmse_pwd_pm']), np.real(nmse['nmse_pwd_acc']), np.real(nmse['nmse_pwd_am'])
nmseAbs_pwd_cnn, nmseAbs_pm, nmseAbs_acc, nmseAbs_am = np.real(nmseAbs['nmseAbs_pwd_cnn']), np.real(nmseAbs['nmseAbs_pwd_pm']), np.real(nmseAbs['nmseAbs_pwd_acc']), np.real(nmseAbs['nmseAbs_pwd_am'])
nmseAngle_pwd_cnn, nmseAngle_pm, nmseAngle_acc, nmseAngle_am = np.real(nmseAngle['nmseAngle_pwd_cnn']), np.real(nmseAngle['nmseAngle_pwd_pm']), np.real(nmseAngle['nmseAngle_pwd_acc']), np.real(nmseAngle['nmseAngle_pwd_am'])
ssim_pwd_cnn, ssim_pm, ssim_acc, ssim_am = np.real(ssim['ssim_pwd_cnn']), np.real(ssim['ssim_pwd_pm']), np.real(ssim['ssim_pwd_acc']), np.real(ssim['ssim_pwd_am'])
ac_pwd_cnn, ac_pm, ac_acc, ac_am = np.real(ac['ac_pwd_cnn']), np.real(ac['ac_pwd_pm']), np.real(ac['ac_pwd_acc']), np.real(ac['ac_pwd_am'])
nmse_pwd_cnn_B, nmse_pm_B, nmse_acc_B, nmse_am_B = np.real(nmse_B['nmse_pwd_cnn']), np.real(nmse_B['nmse_pwd_pm']), np.real(nmse_B['nmse_pwd_acc']), np.real(nmse_B['nmse_pwd_am'])
nmseAbs_pwd_cnn_B, nmseAbs_pm_B, nmseAbs_acc_B, nmseAbs_am_B = np.real(nmseAbs_B['nmseAbs_pwd_cnn']), np.real(nmseAbs_B['nmseAbs_pwd_pm']), np.real(nmseAbs_B['nmseAbs_pwd_acc']), np.real(nmseAbs_B['nmseAbs_pwd_am'])
nmseAngle_pwd_cnn_B, nmseAngle_pm_B, nmseAngle_acc_B, nmseAngle_am_B = np.real(nmseAngle_B['nmseAngle_pwd_cnn']), np.real(nmseAngle_B['nmseAngle_pwd_pm']), np.real(nmseAngle_B['nmseAngle_pwd_acc']), np.real(nmseAngle_B['nmseAngle_pwd_am'])
ssim_pwd_cnn_B, ssim_pm_B, ssim_acc_B, ssim_am_B = np.real(ssim_B['ssim_pwd_cnn']), np.real(ssim_B['ssim_pwd_pm']), np.real(ssim_B['ssim_pwd_acc']), np.real(ssim_B['ssim_pwd_am'])
nmse_pwd_cnn_D, nmse_pm_D, nmse_acc_D, nmse_am_D = np.real(nmse_D['nmse_pwd_cnn']), np.real(nmse_D['nmse_pwd_pm']), np.real(nmse_D['nmse_pwd_acc']), np.real(nmse_D['nmse_pwd_am'])
nmseAbs_pwd_cnn_D, nmseAbs_pm_D, nmseAbs_acc_D, nmseAbs_am_D = np.real(nmseAbs_D['nmseAbs_pwd_cnn']), np.real(nmseAbs_D['nmseAbs_pwd_pm']), np.real(nmseAbs_D['nmseAbs_pwd_acc']), np.real(nmseAbs_D['nmseAbs_pwd_am'])
nmseAngle_pwd_cnn_D, nmseAngle_pm_D, nmseAngle_acc_D, nmseAngle_am_D = np.real(nmseAngle_D['nmseAngle_pwd_cnn']), np.real(nmseAngle_D['nmseAngle_pwd_pm']), np.real(nmseAngle_D['nmseAngle_pwd_acc']), np.real(nmseAngle_D['nmseAngle_pwd_am'])
ssim_pwd_cnn_D, ssim_pm_D, ssim_acc_D, ssim_am_D = np.real(ssim_D['ssim_pwd_cnn']), np.real(ssim_D['ssim_pwd_pm']), np.real(ssim_D['ssim_pwd_acc']), np.real(ssim_D['ssim_pwd_am'])
print("nmse, ssim = {}, {}".format(np.shape(nmse_pwd_cnn), np.shape(ssim_pwd_cnn)))
print("nmse_B, ssim_B = {}, {}".format(np.shape(nmse_pwd_cnn_B), np.shape(ssim_pwd_cnn_B)))
print("nmse_D, ssim_D = {}, {}".format(np.shape(nmse_pwd_cnn_D), np.shape(ssim_pwd_cnn_D)))
os.path.join(args.dataset_path, array_type, 'nmse_'+str(args.n_loudspeakers)+'.npz')
os.path.join(args.dataset_path, array_type, 'nmse_B_'+str(args.n_loudspeakers)+'.npz')
os.path.join(args.dataset_path, array_type, 'nmse_D_'+str(args.n_loudspeakers)+'.npz')
pgf_dataset_path = os.path.join(args.dataset_path, array_type + '_array', 'pgfplot')
if args.array_type == 'linear':
# Let's store the data in arrays more suitable for saving them (and then re-using them in pgfplot)
print("Division by 0 investigation")
print('1) nmse_pwd_cnn = {}\nreshape = {}\nmean = {}\nlog\0 = {}'.format(nmse_pwd_cnn, np.reshape(nmse_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), np.mean(np.reshape(nmse_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0), np.log10(np.mean(np.reshape(nmse_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))))
print('1) nmse_pwd_cnn_B = {}\nreshape = {}\nmean = {}\nlog\0 = {}'.format(nmse_pwd_cnn_B, np.reshape(nmse_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), np.mean(np.reshape(nmse_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0), np.log10(np.mean(np.reshape(nmse_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))))
print('1) nmse_pwd_cnn_D = {}\nreshape = {}\nmean = {}\nlog\0 = {}'.format(nmse_pwd_cnn_D, np.reshape(nmse_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), np.mean(np.reshape(nmse_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0), np.log10(np.mean(np.reshape(nmse_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))))
f_axis_plot = np.round(params_linear_2D.f_axis, 1)
nmse_pwd_cnn_freq_db = 10*np.log10(np.mean(np.reshape(nmse_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmse_pm_freq_db = 10*np.log10(np.mean(np.reshape(nmse_pm + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_acc_freq_db = 10*np.log10(np.mean(np.reshape(nmse_acc + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_am_freq_db = 10*np.log10(np.mean(np.reshape(nmse_am + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_pwd_cnn_freq_db = 10*np.log10(np.mean(np.reshape(nmseAbs_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAbs_pm_freq_db = 10*np.log10(np.mean(np.reshape(nmseAbs_pm + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_acc_freq_db = 10*np.log10(np.mean(np.reshape(nmseAbs_acc + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_am_freq_db = 10*np.log10(np.mean(np.reshape(nmseAbs_am + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_pwd_cnn_freq_db = 10*np.log10(np.mean(np.reshape(nmseAngle_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAngle_pm_freq_db = 10*np.log10(np.mean(np.reshape(nmseAngle_pm + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_acc_freq_db = 10*np.log10(np.mean(np.reshape(nmseAngle_acc + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_am_freq_db = 10*np.log10(np.mean(np.reshape(nmseAngle_am + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
ssim_pwd_cnn_freq = np.mean(np.reshape(ssim_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_pm_freq = np.mean(np.reshape(ssim_pm + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_acc_freq = np.mean(np.reshape(ssim_acc + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_am_freq = np.mean(np.reshape(ssim_am + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ac_pwd_cnn_freq = np.mean(np.reshape(ac_pwd_cnn + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ac_pm_freq = np.mean(np.reshape(ac_pm + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ac_acc_freq = np.mean(np.reshape(ac_acc + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ac_am_freq = np.mean(np.reshape(ac_am + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
nmse_pwd_cnn_freq_db_B = 10*np.log10(np.mean(np.reshape(nmse_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmse_pm_freq_db_B = 10*np.log10(np.mean(np.reshape(nmse_pm_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_acc_freq_db_B = 10*np.log10(np.mean(np.reshape(nmse_acc_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_am_freq_db_B = 10*np.log10(np.mean(np.reshape(nmse_am_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_pwd_cnn_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAbs_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAbs_pm_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAbs_pm_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_acc_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAbs_acc_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_am_freq_db_B= 10*np.log10(np.mean(np.reshape(nmseAbs_am_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_pwd_cnn_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAngle_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAngle_pm_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAngle_pm_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_acc_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAngle_acc_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_am_freq_db_B = 10*np.log10(np.mean(np.reshape(nmseAngle_am_B + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
ssim_pwd_cnn_freq_B = np.mean(np.reshape(ssim_pwd_cnn_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_pm_freq_B = np.mean(np.reshape(ssim_pm_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_acc_freq_B = np.mean(np.reshape(ssim_acc_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_am_freq_B = np.mean(np.reshape(ssim_am_B + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
nmse_pwd_cnn_freq_db_D = 10*np.log10(np.mean(np.reshape(nmse_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmse_pm_freq_db_D = 10*np.log10(np.mean(np.reshape(nmse_pm_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_acc_freq_db_D = 10*np.log10(np.mean(np.reshape(nmse_acc_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmse_am_freq_db_D = 10*np.log10(np.mean(np.reshape(nmse_am_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_pwd_cnn_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAbs_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAbs_pm_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAbs_pm_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_acc_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAbs_acc_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAbs_am_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAbs_am_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_pwd_cnn_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAngle_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0))
nmseAngle_pm_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAngle_pm_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_acc_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAngle_acc_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
nmseAngle_am_freq_db_D = 10*np.log10(np.mean(np.reshape(nmseAngle_am_D + np.finfo(np.float16).eps, (-1,params_linear_2D.N_freqs)), axis=0))
ssim_pwd_cnn_freq_D = np.mean(np.reshape(ssim_pwd_cnn_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_pm_freq_D = np.mean(np.reshape(ssim_pm_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_acc_freq_D = np.mean(np.reshape(ssim_acc_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
ssim_am_freq_D = np.mean(np.reshape(ssim_am_D + np.finfo(np.float16).eps, (-1, params_linear_2D.N_freqs)), axis=0)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db, 11, 1)], 'nmse_pwd_cnn_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pm_freq_db, 11, 1)], 'nmse_pm_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_acc_freq_db, 11, 1)], 'nmse_acc_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_am_freq_db, 11, 1)], 'nmse_am_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db, 11, 1)], 'nmseAbs_pwd_cnn_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db, 11, 1)], 'nmseAbs_pm_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db, 11, 1)], 'nmseAbs_acc_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db, 11, 1)], 'nmseAbs_am_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db, 11, 1)], 'nmseAngle_pwd_cnn_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db, 11, 1)], 'nmseAngle_pm_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db, 11, 1)], 'nmseAngle_acc_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db, 11, 1)], 'nmseAngle_am_freq_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pwd_cnn_freq, 11, 1)], 'ssim_pwd_cnn_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pm_freq, 11, 1)], 'ssim_pm_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_acc_freq, 11, 1)], 'ssim_acc_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_am_freq, 11, 1)], 'ssim_am_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ac_pwd_cnn_freq, 11, 1)], 'ac_pwd_cnn_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ac_pm_freq, 11, 1)], 'ac_pm_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ac_acc_freq, 11, 1)], 'ac_acc_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ac_am_freq, 11, 1)], 'ac_am_freq'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db_B, 11, 1)], 'nmse_pwd_cnn_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pm_freq_db_B, 11, 1)], 'nmse_pm_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_acc_freq_db_B, 11, 1)], 'nmse_acc_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_am_freq_db_B, 11, 1)], 'nmse_am_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db_B, 11, 1)], 'nmseAbs_pwd_cnn_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db_B, 11, 1)], 'nmseAbs_pm_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db_B, 11, 1)], 'nmseAbs_acc_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db_B, 11, 1)], 'nmseAbs_am_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db_B, 11, 1)], 'nmseAngle_pwd_cnn_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db_B, 11, 1)], 'nmseAngle_pm_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db_B, 11, 1)], 'nmseAngle_acc_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db_B, 11, 1)], 'nmseAngle_am_freq_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pwd_cnn_freq_B, 11, 1)], 'ssim_pwd_cnn_freq_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pm_freq_B, 11, 1)], 'ssim_pm_freq_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_acc_freq_B, 11, 1)], 'ssim_acc_freq_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_am_freq_B, 11, 1)], 'ssim_am_freq_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db_D, 11, 1)], 'nmse_pwd_cnn_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_pm_freq_db_D, 11, 1)], 'nmse_pm_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_acc_freq_db_D, 11, 1)], 'nmse_acc_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmse_am_freq_db_D, 11, 1)], 'nmse_am_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db_D, 11, 1)], 'nmseAbs_pwd_cnn_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db_D, 11, 1)], 'nmseAbs_pm_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db_D, 11, 1)], 'nmseAbs_acc_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db_D, 11, 1)], 'nmseAbs_am_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db_D, 11, 1)], 'nmseAngle_pwd_cnn_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db_D, 11, 1)], 'nmseAngle_pm_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db_D, 11, 1)], 'nmseAngle_acc_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db_D, 11, 1)], 'nmseAngle_am_freq_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pwd_cnn_freq_D, 11, 1)], 'ssim_pwd_cnn_freq_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_pm_freq_D, 11, 1)], 'ssim_pm_freq_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_acc_freq_D, 11, 1)], 'ssim_acc_freq_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([f_axis_plot, sg.savgol_filter(ssim_am_freq_D, 11, 1)], 'ssim_am_freq_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pm_freq_db, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_acc_freq_db, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_am_freq_db, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db_B, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pm_freq_db_B, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_acc_freq_db_B, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_am_freq_db_B, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{b}$', fontsize=35)
plt.show()
#plt.subplot(221)
plt.figure(figsize=(20, 9))
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pwd_cnn_freq_db_D, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_pm_freq_db_D, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_acc_freq_db_D, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmse_am_freq_db_D, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db_B, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db_B, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db_B, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db_B, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs, b}$', fontsize=35)
plt.show()
#plt.subplot(221)
plt.figure(figsize=(20, 9))
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pwd_cnn_freq_db_D, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_pm_freq_db_D, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_acc_freq_db_D, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAbs_am_freq_db_D, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs, d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db_B, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db_B, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db_B, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db_B, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle, b}$', fontsize=35)
plt.show()
#plt.subplot(221)
plt.figure(figsize=(20, 9))
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pwd_cnn_freq_db_D, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_pm_freq_db_D, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_acc_freq_db_D, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(nmseAngle_am_freq_db_D, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle, d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(ssim_pwd_cnn_freq_B, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(ssim_pm_freq_B, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(ssim_acc_freq_B, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(ssim_am_freq_B, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$SSIM$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$SSIM_{b}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(f_axis_plot, sg.savgol_filter(ac_pwd_cnn_freq, 11, 1), 'k-')
plt.plot(f_axis_plot, sg.savgol_filter(ac_pm_freq, 11, 1), 'r*-')
plt.plot(f_axis_plot, sg.savgol_filter(ac_acc_freq, 11, 1), 'g*-')
plt.plot(f_axis_plot, sg.savgol_filter(ac_am_freq, 11, 1), 'b*-')
plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$AC [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$AC$', fontsize=35)
plt.show()
#plt.subplot(212)
#plt.figure(figsize=(20, 9))
#plt.plot(f_axis_plot, ssim_pwd_cnn_freq_D, 'rd-')
#plt.plot(f_axis_plot, ssim_pm_freq_D, 'k*-')
#plt.xlabel('$f [Hz]$', fontsize=35), plt.ylabel('$SSIM$', fontsize=35)
#plt.tick_params(axis='both', which='major', labelsize=30)
#plt.legend([ '$\mathrm{PWD_{CNN}}$', '$\mathrm{PM}$'], prop={"size": 30})
#plt.title('Dark - SSIM')
#plt.show()
# Plot w.r.t radius distance
n_f = 41
r_axis_plot = np.round(params_linear_2D.src_pos_test.T[:].T[0],1)
idxs = []
min = -4
for i in range(len(r_axis_plot)):
if r_axis_plot[i] > min:
min = r_axis_plot[i]
idxs.append(i)
f_axis_plot = np.round(params_linear_2D.f_axis, 1)
nmse_pwd_cnn_radius_db = 10*np.log10(np.mean(nmse_pwd_cnn[:, :], axis=1))
nmse_pm_radius_db = 10*np.log10(np.mean(nmse_pm[:, :], axis=1))
nmse_acc_radius_db = 10*np.log10(np.mean(nmse_acc[:, :], axis=1))
nmse_am_radius_db = 10*np.log10(np.mean(nmse_am[:, :], axis=1))
nmseAbs_pwd_cnn_radius_db = 10*np.log10(np.mean(nmseAbs_pwd_cnn[:, :], axis=1))
nmseAbs_pm_radius_db = 10*np.log10(np.mean(nmseAbs_pm[:, :], axis=1))
nmseAbs_acc_radius_db = 10*np.log10(np.mean(nmseAbs_acc[:, :], axis=1))
nmseAbs_am_radius_db = 10*np.log10(np.mean(nmseAbs_am[:, :], axis=1))
nmseAngle_pwd_cnn_radius_db = 10*np.log10(np.mean(nmseAngle_pwd_cnn[:, :], axis=1))
nmseAngle_pm_radius_db = 10*np.log10(np.mean(nmseAngle_pm[:, :], axis=1))
nmseAngle_acc_radius_db = 10*np.log10(np.mean(nmseAngle_acc[:, :], axis=1))
nmseAngle_am_radius_db = 10*np.log10(np.mean(nmseAngle_am[:, :], axis=1))
ssim_pwd_cnn_radius = np.mean(ssim_pwd_cnn[:, :], axis=1)
ssim_pm_radius = np.mean(ssim_pm[:, :], axis=1)
ssim_acc_radius = np.mean(ssim_acc[:, :], axis=1)
ssim_am_radius = np.mean(ssim_am[:, :], axis=1)
ac_pwd_cnn_radius_db = np.mean(ac_pwd_cnn[:, :], axis=1)
ac_pm_radius_db = np.mean(ac_pm[:, :], axis=1)
ac_acc_radius_db = np.mean(ac_acc[:, :], axis=1)
ac_am_radius_db = np.mean(ac_am[:, :], axis=1)
nmse_pwd_cnn_radius_db_B = 10*np.log10(np.mean(nmse_pwd_cnn_B[:, :], axis=1))
nmse_pm_radius_db_B = 10*np.log10(np.mean(nmse_pm_B[:, :], axis=1))
nmse_acc_radius_db_B = 10*np.log10(np.mean(nmse_acc_B[:, :], axis=1))
nmse_am_radius_db_B = 10*np.log10(np.mean(nmse_am_B[:, :], axis=1))
nmseAbs_pwd_cnn_radius_db_B = 10*np.log10(np.mean(nmseAbs_pwd_cnn_B[:, :], axis=1))
nmseAbs_pm_radius_db_B = 10*np.log10(np.mean(nmseAbs_pm_B[:, :], axis=1))
nmseAbs_acc_radius_db_B = 10*np.log10(np.mean(nmseAbs_acc_B[:, :], axis=1))
nmseAbs_am_radius_db_B = 10*np.log10(np.mean(nmseAbs_am_B[:, :], axis=1))
nmseAngle_pwd_cnn_radius_db_B = 10*np.log10(np.mean(nmseAngle_pwd_cnn_B[:, :], axis=1))
nmseAngle_pm_radius_db_B = 10*np.log10(np.mean(nmseAngle_pm_B[:, :], axis=1))
nmseAngle_acc_radius_db_B = 10*np.log10(np.mean(nmseAngle_acc_B[:, :], axis=1))
nmseAngle_am_radius_db_B = 10*np.log10(np.mean(nmseAngle_am_B[:, :], axis=1))
ssim_pwd_cnn_radius_B = np.mean(ssim_pwd_cnn_B[:, :], axis=1)
ssim_pm_radius_B = np.mean(ssim_pm_B[:, :], axis=1)
ssim_acc_radius_B = np.mean(ssim_acc_B[:, :], axis=1)
ssim_am_radius_B = np.mean(ssim_am_B[:, :], axis=1)
nmse_pwd_cnn_radius_db_D = 10*np.log10(np.mean(nmse_pwd_cnn_D[:, :], axis=1))
nmse_pm_radius_db_D = 10*np.log10(np.mean(nmse_pm_D[:, :], axis=1))
nmse_acc_radius_db_D = 10*np.log10(np.mean(nmse_acc_D[:, :], axis=1))
nmse_am_radius_db_D = 10*np.log10(np.mean(nmse_am_D[:, :], axis=1))
nmseAbs_pwd_cnn_radius_db_D = 10*np.log10(np.mean(nmseAbs_pwd_cnn_D[:, :], axis=1))
nmseAbs_pm_radius_db_D = 10*np.log10(np.mean(nmseAbs_pm_D[:, :], axis=1))
nmseAbs_acc_radius_db_D = 10*np.log10(np.mean(nmseAbs_acc_D[:, :], axis=1))
nmseAbs_am_radius_db_D = 10*np.log10(np.mean(nmseAbs_am_D[:, :], axis=1))
nmseAngle_pwd_cnn_radius_db_D = 10*np.log10(np.mean(nmseAngle_pwd_cnn_D[:, :], axis=1))
nmseAngle_pm_radius_db_D = 10*np.log10(np.mean(nmseAngle_pm_D[:, :], axis=1))
nmseAngle_acc_radius_db_D = 10*np.log10(np.mean(nmseAngle_acc_D[:, :], axis=1))
nmseAngle_am_radius_db_D = 10*np.log10(np.mean(nmseAngle_am_D[:, :], axis=1))
ssim_pwd_cnn_radius_D = np.mean(ssim_pwd_cnn_D[:, :], axis=1)
ssim_pm_radius_D = np.mean(ssim_pm_D[:, :], axis=1)
ssim_acc_radius_D = np.mean(ssim_acc_D[:, :], axis=1)
ssim_am_radius_D = np.mean(ssim_am_D[:, :], axis=1)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db[idxs], 5, 1)], 'nmse_pwd_cnn_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db[idxs], 5, 1)], 'nmse_pm_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db[idxs], 5, 1)], 'nmse_acc_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db[idxs], 5, 1)], 'nmse_am_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db[idxs], 5, 1)], 'nmseAbs_pwd_cnn_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db[idxs], 5, 1)], 'nmseAbs_pm_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db[idxs], 5, 1)], 'nmseAbs_acc_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db[idxs], 5, 1)], 'nmseAbs_am_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db[idxs], 5, 1)], 'nmseAngle_pwd_cnn_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db[idxs], 5, 1)], 'nmseAngle_pm_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db[idxs], 5, 1)], 'nmseAngle_acc_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db[idxs], 5, 1)], 'nmseAngle_am_radius_db'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pwd_cnn_radius[idxs], 5, 1)], 'ssim_pwd_cnn_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pm_radius[idxs], 5, 1)], 'ssim_pm_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_acc_radius[idxs], 5, 1)], 'ssim_acc_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_am_radius[idxs], 5, 1)], 'ssim_am_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ac_pwd_cnn_radius_db[idxs], 5, 1)], 'ac_pwd_cnn_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ac_pm_radius_db[idxs], 5, 1)], 'ac_pm_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ac_acc_radius_db[idxs], 5, 1)], 'ac_acc_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ac_am_radius_db[idxs], 5, 1)], 'ac_am_radius'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db_B[idxs], 5, 1)], 'nmse_pwd_cnn_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db_B[idxs], 5, 1)], 'nmse_pm_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db_B[idxs], 5, 1)], 'nmse_acc_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db_B[idxs], 5, 1)], 'nmse_am_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db_B[idxs], 5, 1)], 'nmseAbs_pwd_cnn_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db_B[idxs], 5, 1)], 'nmseAbs_pm_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db_B[idxs], 5, 1)], 'nmseAbs_acc_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db_B[idxs], 5, 1)], 'nmseAbs_am_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db_B[idxs], 5, 1)], 'nmseAngle_pwd_cnn_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db_B[idxs], 5, 1)], 'nmseAngle_pm_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db_B[idxs], 5, 1)], 'nmseAngle_acc_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db_B[idxs], 5, 1)], 'nmseAngle_am_radius_db_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pwd_cnn_radius_B[idxs], 5, 1)], 'ssim_pwd_cnn_radius_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pm_radius_B[idxs], 5, 1)], 'ssim_pm_radius_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_acc_radius_B[idxs], 5, 1)], 'ssim_acc_radius_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_am_radius_B[idxs], 5, 1)], 'ssim_am_radius_B'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db_D[idxs], 5, 1)], 'nmse_pwd_cnn_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db_D[idxs], 5, 1)], 'nmse_pm_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db_D[idxs], 5, 1)], 'nmse_acc_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db_D[idxs], 5, 1)], 'nmse_am_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db_D[idxs], 5, 1)], 'nmseAbs_pwd_cnn_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db_D[idxs], 5, 1)], 'nmseAbs_pm_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db_D[idxs], 5, 1)], 'nmseAbs_acc_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db_D[idxs], 5, 1)], 'nmseAbs_am_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db_D[idxs], 5, 1)], 'nmseAngle_pwd_cnn_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db_D[idxs], 5, 1)], 'nmseAngle_pm_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db_D[idxs], 5, 1)], 'nmseAngle_acc_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db_D[idxs], 5, 1)], 'nmseAngle_am_radius_db_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pwd_cnn_radius_D[idxs], 5, 1)], 'ssim_pwd_cnn_radius_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_pm_radius_D[idxs], 5, 1)], 'ssim_pm_radius_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_acc_radius_D[idxs], 5, 1)], 'ssim_acc_radius_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plot2pgf([r_axis_plot[idxs], sg.savgol_filter(ssim_am_radius_D[idxs], 5, 1)], 'ssim_am_radius_D'+str(args.n_loudspeakers), folder=pgf_dataset_path)
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db_B[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db_B[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db_B[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db_B[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{b}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(212)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pwd_cnn_radius_db_D[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_pm_radius_db_D[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_acc_radius_db_D[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmse_am_radius_db_D[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db_B[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db_B[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db_B[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db_B[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs, b}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(212)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pwd_cnn_radius_db_D[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_pm_radius_db_D[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_acc_radius_db_D[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAbs_am_radius_db_D[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Abs, d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db_B[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db_B[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db_B[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db_B[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle, b}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(212)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pwd_cnn_radius_db_D[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_pm_radius_db_D[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_acc_radius_db_D[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(nmseAngle_am_radius_db_D[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$MSE [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend([ '$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$MSE_{Angle, d}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ssim_pwd_cnn_radius_B[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ssim_pm_radius_B[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ssim_acc_radius_B[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ssim_am_radius_B[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$SSIM$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend(['$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$SSIM_{b}$', fontsize=35)
plt.show()
plt.figure(figsize=(20, 9))
#plt.subplot(211)
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ac_pwd_cnn_radius_db[idxs], 5, 1), 'k-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ac_pm_radius_db[idxs], 5, 1), 'r*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ac_acc_radius_db[idxs], 5, 1), 'g*-')
plt.plot(r_axis_plot[idxs], sg.savgol_filter(ac_am_radius_db[idxs], 5, 1), 'b*-')
plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$AC [dB]$', fontsize=35)
plt.tick_params(axis='both', which='major', labelsize=30)
plt.legend(['$\mathrm{MZ-DLPM}$', '$\mathrm{PM}$', '$\mathrm{ACC}$', '$\mathrm{AM}$'], prop={"size": 30})
plt.title('$AC$', fontsize=35)
#plt.subplot(212)
#plt.plot(r_axis_plot, ssim_pwd_cnn_radius_D, 'rd-')
#plt.plot(r_axis_plot, ssim_pm_radius_D, 'k*-')
#plt.xlabel('$r [m]$', fontsize=35), plt.ylabel('$SSIM$', fontsize=35)
#plt.tick_params(axis='both', which='major', labelsize=30)
#plt.legend(['$\mathrm{PWD_{CNN}}$', '$\mathrm{PM}$'], prop={"size": 30})
#plt.title('Dark - SSIM')
plt.show()
print('done')
if __name__ == '__main__':
main()
print("Plots Ended")