Compare commits
3 Commits
e1a921c2eb
...
71b84b9ed3
Author | SHA1 | Date | |
---|---|---|---|
71b84b9ed3 | |||
46d12c7605 | |||
65bb11c7ed |
@ -15,6 +15,7 @@ def merge(files):
|
|||||||
merge = []
|
merge = []
|
||||||
plt.figure()
|
plt.figure()
|
||||||
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"]
|
||||||
@ -23,6 +24,7 @@ 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))
|
||||||
@ -43,6 +45,7 @@ def merge(files):
|
|||||||
plt.plot(all[2, :], "k")
|
plt.plot(all[2, :], "k")
|
||||||
percentage = 1-percentage
|
percentage = 1-percentage
|
||||||
return percentage, all
|
return percentage, all
|
||||||
|
>>>>>>> e1a921c2eb7fb8f51d860e28b81ff3a41af21abc
|
||||||
|
|
||||||
|
|
||||||
def debug(percentage, out):
|
def debug(percentage, out):
|
||||||
@ -84,10 +87,15 @@ def time_scale(p, o):
|
|||||||
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)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
cs_rut = ip.CubicSpline(p[::-1], rut_perc[::-1])
|
||||||
|
cs_mono = ip.CubicSpline(p[::-1], mono_perc[::-1])
|
||||||
|
=======
|
||||||
# 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])
|
||||||
cs_rut = ip.interp1d(p[::-1], rut_perc[::-1])
|
cs_rut = ip.interp1d(p[::-1], rut_perc[::-1])
|
||||||
cs_mono = ip.interp1d(p[::-1], mono_perc[::-1])
|
cs_mono = ip.interp1d(p[::-1], mono_perc[::-1])
|
||||||
|
>>>>>>> e1a921c2eb7fb8f51d860e28b81ff3a41af21abc
|
||||||
|
|
||||||
plt.figure()
|
plt.figure()
|
||||||
ph = np.linspace(0.01, 0.99, 100)
|
ph = np.linspace(0.01, 0.99, 100)
|
||||||
@ -119,6 +127,12 @@ def read_file(file):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
p, o = merge(sys.argv[1:])
|
p, o = merge(sys.argv[1:])
|
||||||
|
<<<<<<< HEAD
|
||||||
|
np.savez("merged.npz", p=p, o=o)
|
||||||
|
# eval_data_print(f)
|
||||||
|
stacked_plot(p, o)
|
||||||
|
=======
|
||||||
|
>>>>>>> e1a921c2eb7fb8f51d860e28b81ff3a41af21abc
|
||||||
# debug(p, o)
|
# debug(p, o)
|
||||||
stacked_plot(p, o)
|
stacked_plot(p, o)
|
||||||
time_scale(p, o)
|
time_scale(p, o)
|
||||||
|
@ -79,10 +79,14 @@ class Rect_Evaluator(Evaluator):
|
|||||||
new_eval_points = np.arange(len(self.eval_points))
|
new_eval_points = np.arange(len(self.eval_points))
|
||||||
mask = self.mask.copy()
|
mask = self.mask.copy()
|
||||||
for nc, ev_points in zip(new_eval_points, self.eval_points):
|
for nc, ev_points in zip(new_eval_points, self.eval_points):
|
||||||
maske_low = np.min(ev_points) <= self.mask
|
maske_low = np.min(ev_points) >= self.mask
|
||||||
maske_high = np.max(ev_points) >= self.mask
|
maske_high = np.max(ev_points) <= self.mask
|
||||||
maske = np.logical_and(maske_high, maske_low)
|
mask[np.logical_and(maske_high, maske_low)] = nc
|
||||||
mask[maske] = nc
|
|
||||||
|
plt.figure()
|
||||||
|
plt.imshow(mask)
|
||||||
|
plt.figure()
|
||||||
|
plt.imshow(self.mask)
|
||||||
return mask
|
return mask
|
||||||
|
|
||||||
def gen_mask_helper(self, img: FFT):
|
def gen_mask_helper(self, img: FFT):
|
||||||
|
Loading…
Reference in New Issue
Block a user