Loading scripts/create_histogram_summary.py +38 −10 Original line number Diff line number Diff line Loading @@ -80,10 +80,19 @@ if __name__ == "__main__": else: limits_per_measure = { "MLD": ("MLD", [0, 1, 2, 3, 4, 5, 10, 20, math.inf]), "DIFF": ("MAXIMUM ABS DIFF", [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769]), "DIFF": ( "MAXIMUM ABS DIFF", [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769], ), "SSNR": ("MIN_SSNR", [-math.inf, 0, 10, 20, 30, 40, 40, 50, 60, 100]), "ODG": ("MIN_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]), "DELTA_ODG": ("DELTA_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]), "ODG": ( "MIN_ODG", [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5], ), "DELTA_ODG": ( "DELTA_ODG", [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5], ), } (measure_label, limits) = limits_per_measure[measure] Loading @@ -100,7 +109,14 @@ if __name__ == "__main__": results_sorted[testcase][k] = val if limits is None: vals = [float(x) for x in [m[measure_label] for m in results_sorted.values() if m[measure_label] != "None" and m[measure_label] != ""]] vals = [ float(x) for x in [ m[measure_label] for m in results_sorted.values() if m[measure_label] != "None" and m[measure_label] != "" ] ] start = min(vals) f = 10 ** (2 - int(np.floor(np.log10(abs(start)))) - 1) start = np.floor(start * f) / f Loading @@ -111,7 +127,10 @@ if __name__ == "__main__": # Output CSV file with open(csv_summary, "w") as fp: limits_labels = [f"{a:g}" for a in limits] + ["","None"] # Put None cases in separate bin limits_labels = [f"{a:g}" for a in limits] + [ "", "None", ] # Put None cases in separate bin headerline = f"Format;Category;" + ";".join(limits_labels) + "\n" fp.write(headerline) Loading @@ -138,7 +157,16 @@ if __name__ == "__main__": fp.write(line) # Matplotlib histogram ax.bar(limits_labels, data, 1, align='edge', edgecolor='black', linewidth=0.5, label=cat, bottom=bottom) ax.bar( limits_labels, data, 1, align="edge", edgecolor="black", linewidth=0.5, label=cat, bottom=bottom, ) bottom += data # Histogram layout Loading Loading
scripts/create_histogram_summary.py +38 −10 Original line number Diff line number Diff line Loading @@ -80,10 +80,19 @@ if __name__ == "__main__": else: limits_per_measure = { "MLD": ("MLD", [0, 1, 2, 3, 4, 5, 10, 20, math.inf]), "DIFF": ("MAXIMUM ABS DIFF", [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769]), "DIFF": ( "MAXIMUM ABS DIFF", [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769], ), "SSNR": ("MIN_SSNR", [-math.inf, 0, 10, 20, 30, 40, 40, 50, 60, 100]), "ODG": ("MIN_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]), "DELTA_ODG": ("DELTA_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]), "ODG": ( "MIN_ODG", [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5], ), "DELTA_ODG": ( "DELTA_ODG", [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5], ), } (measure_label, limits) = limits_per_measure[measure] Loading @@ -100,7 +109,14 @@ if __name__ == "__main__": results_sorted[testcase][k] = val if limits is None: vals = [float(x) for x in [m[measure_label] for m in results_sorted.values() if m[measure_label] != "None" and m[measure_label] != ""]] vals = [ float(x) for x in [ m[measure_label] for m in results_sorted.values() if m[measure_label] != "None" and m[measure_label] != "" ] ] start = min(vals) f = 10 ** (2 - int(np.floor(np.log10(abs(start)))) - 1) start = np.floor(start * f) / f Loading @@ -111,7 +127,10 @@ if __name__ == "__main__": # Output CSV file with open(csv_summary, "w") as fp: limits_labels = [f"{a:g}" for a in limits] + ["","None"] # Put None cases in separate bin limits_labels = [f"{a:g}" for a in limits] + [ "", "None", ] # Put None cases in separate bin headerline = f"Format;Category;" + ";".join(limits_labels) + "\n" fp.write(headerline) Loading @@ -138,7 +157,16 @@ if __name__ == "__main__": fp.write(line) # Matplotlib histogram ax.bar(limits_labels, data, 1, align='edge', edgecolor='black', linewidth=0.5, label=cat, bottom=bottom) ax.bar( limits_labels, data, 1, align="edge", edgecolor="black", linewidth=0.5, label=cat, bottom=bottom, ) bottom += data # Histogram layout Loading