loca2l
This commit is contained in:
parent
65bb11c7ed
commit
46d12c7605
@ -14,6 +14,7 @@ def check_percentage(p1, p2):
|
|||||||
def merge(files):
|
def merge(files):
|
||||||
merge = []
|
merge = []
|
||||||
for file in files:
|
for file in files:
|
||||||
|
print(file)
|
||||||
data = np.load(file, allow_pickle=True)
|
data = np.load(file, allow_pickle=True)
|
||||||
old_percentage = data["percentage"]
|
old_percentage = data["percentage"]
|
||||||
w_percentage = data["w_percentage"]
|
w_percentage = data["w_percentage"]
|
||||||
@ -22,11 +23,11 @@ def merge(files):
|
|||||||
out = []
|
out = []
|
||||||
for o in ["out_1", "out_2", "out_3", "out_4"]:
|
for o in ["out_1", "out_2", "out_3", "out_4"]:
|
||||||
out.append(np.array(data[o]))
|
out.append(np.array(data[o]))
|
||||||
|
print(out)
|
||||||
out = np.array(out)[:, :, 0]
|
out = np.array(out)[:, :, 0]
|
||||||
summe = np.max(np.sum(out, axis=0))
|
summe = np.max(np.sum(out, axis=0))
|
||||||
out = out / summe
|
out = out / summe
|
||||||
merge.append(out)
|
merge.append(out)
|
||||||
print(merge)
|
|
||||||
merge = sum(merge)
|
merge = sum(merge)
|
||||||
summe = np.max(np.sum(merge, axis=0))
|
summe = np.max(np.sum(merge, axis=0))
|
||||||
merge = merge / summe
|
merge = merge / summe
|
||||||
@ -66,7 +67,7 @@ def time_scale(p, o):
|
|||||||
mono_perc = -o[2]
|
mono_perc = -o[2]
|
||||||
mono_perc = mono_perc - np.min(mono_perc)
|
mono_perc = mono_perc - np.min(mono_perc)
|
||||||
mono_perc /= np.max(mono_perc)
|
mono_perc /= np.max(mono_perc)
|
||||||
|
|
||||||
cs_rut = ip.CubicSpline(p[::-1], rut_perc[::-1])
|
cs_rut = ip.CubicSpline(p[::-1], rut_perc[::-1])
|
||||||
cs_mono = ip.CubicSpline(p[::-1], mono_perc[::-1])
|
cs_mono = ip.CubicSpline(p[::-1], mono_perc[::-1])
|
||||||
|
|
||||||
@ -88,6 +89,7 @@ def time_scale(p, o):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
p, o = merge(sys.argv[1:])
|
p, o = merge(sys.argv[1:])
|
||||||
|
np.savez("merged.npz", p=p, o=o)
|
||||||
# eval_data_print(f)
|
# eval_data_print(f)
|
||||||
stacked_plot(p, o)
|
stacked_plot(p, o)
|
||||||
# debug(p, o)
|
# debug(p, o)
|
||||||
|
Loading…
Reference in New Issue
Block a user