From 46d12c7605147a88a3b88635cd7c00aa567bf19a Mon Sep 17 00:00:00 2001 From: Jacob Date: Wed, 19 Apr 2023 16:57:16 +0200 Subject: [PATCH] loca2l --- clean_python/analysis.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clean_python/analysis.py b/clean_python/analysis.py index 1389e48..1d630a4 100644 --- a/clean_python/analysis.py +++ b/clean_python/analysis.py @@ -14,6 +14,7 @@ def check_percentage(p1, p2): def merge(files): merge = [] for file in files: + print(file) data = np.load(file, allow_pickle=True) old_percentage = data["percentage"] w_percentage = data["w_percentage"] @@ -22,11 +23,11 @@ def merge(files): out = [] for o in ["out_1", "out_2", "out_3", "out_4"]: out.append(np.array(data[o])) + print(out) out = np.array(out)[:, :, 0] summe = np.max(np.sum(out, axis=0)) out = out / summe merge.append(out) - print(merge) merge = sum(merge) summe = np.max(np.sum(merge, axis=0)) merge = merge / summe @@ -66,7 +67,7 @@ def time_scale(p, o): mono_perc = -o[2] mono_perc = mono_perc - np.min(mono_perc) mono_perc /= np.max(mono_perc) - + cs_rut = ip.CubicSpline(p[::-1], rut_perc[::-1]) cs_mono = ip.CubicSpline(p[::-1], mono_perc[::-1]) @@ -88,6 +89,7 @@ def time_scale(p, o): if __name__ == "__main__": p, o = merge(sys.argv[1:]) + np.savez("merged.npz", p=p, o=o) # eval_data_print(f) stacked_plot(p, o) # debug(p, o)