import matplotlib.pyplot as plt import morphokinetics as mk import results import sys import traceback plt.title("$ R \propto d ( \\frac{s v_s}{r_g^2} )$") label = r'$\frac{s v_s}{r_g^2}$' plt.ylabel(label) label = r'R (total rate)' plt.xlabel(label) plt.grid(True) workingPath = os.getcwd() for f in i.getFluxes(): folder = "flux3.5e" + str(i) print(folder) try: p = i.getInputParameters(glob.glob(f + "/*/output*")[0]) os.chdir(f) temperatures = i.getTemperatures() meanValues = mk.getIslandDistribution(temperatures, False, False) except (OSError, IndexError): print("error changing to flux {}".format(f)) continue os.chdir(workingPath) vs = meanValues.getGrowthSlope() s = (0.3 * 400 * 400) / meanValues.getIslandsAmount() vg = meanValues.getGyradiusSlope() rtt = mk.getRtt(temperatures)
ls="--", marker=markers[i], label="W temp" + str(i)) handles.append(lg) #ax.text(x[index],d.negs[k][index]/cove[index], r"$W_{"+str(k)+r"^\nu}$", color=cm1(k/8), bbox=bbox_props) #W = np.array(W) #print(np.shape(W)) #lg, = ax.loglog(x, np.sum(W, axis=0), "+", label="W sum"); handles.append(lg) plt.legend(handles=handles, loc="best") fig = plt.figure(figsize=(15, 15)) ax = fig.gca() workingPath = os.getcwd() for f in inf.getFluxes(): os.chdir(workingPath) print(f) os.chdir(f) fPath = os.getcwd() for t in inf.getTemperatures(): print("\t", t) try: os.chdir(str(t) + "/results") fig.clf() ax = fig.gca() ratioplicity(ax) #ax.set_ylim(1e-4,1e1) #ax.set_yscale("linear") #ax.set_ylim(0,6) fig.savefig("ratioplicity" + str(t) + ".pdf", bbox_inches='tight')
plt.legend(numpoints=1, prop={'size': 8}, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) plt.grid() plt.title("flux: {:.1e} temperature: {:d}".format(p.flux, int(p.temp))) plt.savefig("../../../plot2" + str(p.flux) + str(p.temp) + ".png") ########################################################## ########## Main function ##################### ########################################################## workingPath = os.getcwd() fluxes = inf.getFluxes() for f in fluxes: firstCollisionTime = [] temperaturesPlot = [] print(f) os.chdir(f) fPath = os.getcwd() for t in inf.getTemperatures()[15:]: try: os.chdir(str(t) + "/results") print("\t", t) inf.splitDataFiles() diffusivityDistance() except FileNotFoundError: pass os.chdir(fPath)
r_tt, temp, flux, L1, L2, maxN = i.getInputParameters() allData = [] filesN = glob.glob("data[0-9]*.txt") for i in range(0, len(filesN) - 1): fileName = "data" + str(i) + ".txt" allData.append(np.loadtxt(fname=fileName)) #plt.loglog(allData[1], allData[15]) ########################################################## ########## Main function ##################### ########################################################## workingPath = os.getcwd() fluxes = i.getFluxes() for f in fluxes: firstCollisionTime = [] temperaturesPlot = [] print(f) os.chdir(f) fPath = os.getcwd() for t in i.getTemperatures(): try: os.chdir(str(t) + "/results") print("\t", t) i.splitAeFiles() #diffusivityDistance() # find first dimer occurrence except FileNotFoundError: pass
bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) plt.grid() plt.title("flux: {:.1e} temperature: {:d}".format(p.flux, int(p.temp))) plt.savefig("plot" + str(p.flux) + str(p.temp) + ".png") return time, neg1 ########################################################## ########## Main function ##################### ########################################################## workingPath = os.getcwd() fluxes = info.getFluxes() for f in fluxes: firstCollisionTime = [] temperaturesPlot = [] print(f) os.chdir(f) fPath = os.getcwd() for t in info.getTemperatures(): try: os.chdir(str(t) + "/results") print("\t", t) info.splitDataFiles() time, neg1 = diffusivityDistance() # find first dimer occurrence i = np.argmax(neg1 > 0) firstCollisionTime.append(time[i])