Compare commits

...

3 Commits

Author SHA1 Message Date
71b84b9ed3 AHHHHHHH 2023-04-20 20:17:23 +02:00
46d12c7605 loca2l 2023-04-19 16:57:16 +02:00
65bb11c7ed local 2023-04-19 16:56:21 +02:00
2 changed files with 22 additions and 4 deletions

View File

@ -15,6 +15,7 @@ def merge(files):
merge = []
plt.figure()
for file in files:
print(file)
data = np.load(file, allow_pickle=True)
old_percentage = data["percentage"]
w_percentage = data["w_percentage"]
@ -23,6 +24,7 @@ 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))
@ -43,6 +45,7 @@ def merge(files):
plt.plot(all[2, :], "k")
percentage = 1-percentage
return percentage, all
>>>>>>> e1a921c2eb7fb8f51d860e28b81ff3a41af21abc
def debug(percentage, out):
@ -84,10 +87,15 @@ def time_scale(p, o):
mono_perc = mono_perc - np.min(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_mono = ip.CubicSpline(p[::-1], mono_perc[::-1])
cs_rut = ip.interp1d(p[::-1], rut_perc[::-1])
cs_mono = ip.interp1d(p[::-1], mono_perc[::-1])
>>>>>>> e1a921c2eb7fb8f51d860e28b81ff3a41af21abc
plt.figure()
ph = np.linspace(0.01, 0.99, 100)
@ -119,6 +127,12 @@ def read_file(file):
if __name__ == "__main__":
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)
stacked_plot(p, o)
time_scale(p, o)

View File

@ -79,10 +79,14 @@ class Rect_Evaluator(Evaluator):
new_eval_points = np.arange(len(self.eval_points))
mask = self.mask.copy()
for nc, ev_points in zip(new_eval_points, self.eval_points):
maske_low = np.min(ev_points) <= self.mask
maske_high = np.max(ev_points) >= self.mask
maske = np.logical_and(maske_high, maske_low)
mask[maske] = nc
maske_low = np.min(ev_points) >= self.mask
maske_high = np.max(ev_points) <= self.mask
mask[np.logical_and(maske_high, maske_low)] = nc
plt.figure()
plt.imshow(mask)
plt.figure()
plt.imshow(self.mask)
return mask
def gen_mask_helper(self, img: FFT):