updated stuff

This commit is contained in:
Jacob Holder 2023-05-10 10:06:29 +02:00
parent e1fce68c5e
commit 84bed226f5
Signed by: jacob
GPG Key ID: 2194FC747048A7FD
3 changed files with 24 additions and 23 deletions

View File

@ -1,2 +1,3 @@
from .ising import runner
from .main import runner
from .analysis import analysis_main

View File

@ -1,13 +1,10 @@
from ditact_pic import plot
from spin_image import SpinImage, FFT
from .ditact_pic import plot
from .spin_image import SpinImage, FFT
import sys
import numpy as np
import matplotlib.pyplot as plt
import glob
import scipy.interpolate as ip
from spin_image import SpinImage, FFT
from ditact_pic import plot
from lattices import VO2_Lattice
from .lattices import VO2_Lattice
plt.style.use(["style", "colors", "one_column"])
@ -43,9 +40,9 @@ def new_merge(files):
print(out)
out = np.array(out)[:, :, 0]
spot_rutile.append(out[0, :]) #rutile
spot_mono.append(out[2, :]) #mono
spot_diff.append(out[3, :]) #diff
spot_rutile.append(out[0, :]) # rutile
spot_mono.append(out[2, :]) # mono
spot_diff.append(out[3, :]) # diff
wp = np.concatenate(wp, axis=0)
op = np.concatenate(op, axis=0)
@ -73,7 +70,7 @@ def new_merge(files):
x = op
plt.plot(x, spot_rutile, "r.", label="rutile")
plt.plot(x, spot_mono, "g.", label="mono")
plt.plot(x, spot_diff, "b.",label="diff" )
plt.plot(x, spot_diff, "b.", label="diff")
plt.legend()
ma = np.max(spot_rutile+spot_mono+spot_diff)
spot_rutile /= ma
@ -151,7 +148,8 @@ def stacked_plot(ax, percentage, out, title=""):
bbox=dict(boxstyle='square,pad=0.0', ec="None", fc="w"))
ax.stackplot(percentage, out[[0, 2, 1]], colors=["None"], ec="k")
ax.plot([0,1], [0.52,1],":k")
ax.plot([0, 1], [0.52, 1], ":k")
def stacked_plot_norm(ax, percentage, out, title=""):
@ -162,11 +160,12 @@ def stacked_plot_norm(ax, percentage, out, title=""):
sum = out[0] + out[1]
out /= sum
#out[0] += ref
#out /= 1+ref
# out[0] += ref
# out /= 1+ref
out[2] = 0.
stacked_plot(ax, percentage, out,title)
stacked_plot(ax, percentage, out, title)
def time_scale(ax, p, o):
rut_perc = o[0]
@ -208,6 +207,7 @@ def read_file(file):
o = files["o"]
return p, o
def intens(ax, file, p, o):
intens = FFT()
intens.load(file)
@ -256,7 +256,7 @@ def intens(ax, file, p, o):
axins.set_yticks([0, 1])
if __name__ == "__main__":
def analysis_main():
p, o = new_merge(sys.argv[2:])
np.savez("merged.npz", p=p, o=o)

View File

@ -1,7 +1,7 @@
from plotter import Plotter
from .plotter import Plotter
import matplotlib
from lattices import VO2_New
from spin_image import SpinImage, FFT
from .lattices import VO2_New
from .spin_image import SpinImage, FFT
import numpy as np
import matplotlib.pyplot as plt