Compare commits
No commits in common. "784aab8312b268e2b4709021a0d2923dcaeef796" and "da394e3bda9570f7e3a4b56845f0a72cbe2fc76d" have entirely different histories.
784aab8312
...
da394e3bda
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 508 KiB |
@ -61,6 +61,14 @@ def norm(*intenss):
|
||||
return max
|
||||
|
||||
|
||||
def norm(*intenss):
|
||||
max = 1e-10
|
||||
for intens in intenss:
|
||||
m = np.max(intens.intens)
|
||||
max = np.maximum(max, m)
|
||||
return max
|
||||
|
||||
|
||||
def plot_all(intens_rutile, intens_mono, intens_mixed):
|
||||
fig, axs = plt.subplots(3, 2)
|
||||
fig.set_figheight(5.2)
|
||||
@ -127,8 +135,8 @@ def load():
|
||||
|
||||
if __name__ == "__main__":
|
||||
np.random.seed(1234)
|
||||
simulate()
|
||||
np.savez("intens.npz", r=r, mo=mo, mi=mi)
|
||||
# simulate()
|
||||
# np.savez("intens.npz", r=r, mo=mo, mi=mi)
|
||||
r, mo, mi = load()
|
||||
max = norm(r, mo, mi)
|
||||
r.intens = r.intens/max
|
||||
|
@ -60,7 +60,7 @@ def ising(file, num):
|
||||
weighted_percentage = np.array(weighted_percentage)
|
||||
percentage /= np.max(percentage)
|
||||
|
||||
np.savez(f"ising_rect_{seed}.npz",
|
||||
np.savez(f"ising_rect_{num}.npz",
|
||||
w_percentage=weighted_percentage, percentage=percentage, out_1=out_rect[0],
|
||||
out_2=out_rect[1], out_3=out_rect[2], out_4=out_rect[3])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user