updated stuff
This commit is contained in:
parent
e1fce68c5e
commit
84bed226f5
@ -1,2 +1,3 @@
|
||||
from .ising import runner
|
||||
from .main import runner
|
||||
from .analysis import analysis_main
|
||||
|
@ -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,19 +40,19 @@ 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)
|
||||
|
||||
|
||||
wp = 1-wp
|
||||
op = 1-op
|
||||
|
||||
spot_rutile = np.concatenate(spot_rutile, axis=0)
|
||||
spot_mono = np.concatenate(spot_mono, axis=0)
|
||||
spot_diff = np.concatenate(spot_diff, axis=0)
|
||||
|
||||
|
||||
arg_sort = np.argsort(op)
|
||||
wp = wp[arg_sort]
|
||||
op = op[arg_sort]
|
||||
@ -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
|
||||
@ -150,23 +147,25 @@ def stacked_plot(ax, percentage, out, title=""):
|
||||
ax.text(0.35, 0.73, "diffusive", backgroundcolor="w",
|
||||
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=""):
|
||||
|
||||
out = out.copy()
|
||||
ref = out[0][0]
|
||||
out[0] = out[0] - ref
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user