Exemplo n.º 1
0
 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)
 d = fun.fractalD(rtt / p.flux)
 rg = meanValues.getLastGyradius()
 print(len(d), len(s), len(rg))
 command = "d * ((s*vs)/rg**2)"
 y = eval(command)
 x = meanValues.getTotalRatio()
 print(len(x), len(y))
 try:
     plt.ylabel(command)
     plt.loglog(x, y, label=f)
     plt.loglog(x, x / 6e10, label="total ratio {}".format(f))
     plt.legend(loc='upper left', prop={'size': 6})
     plt.savefig("dSVsRgVsRate.png")
 except ValueError:
     plt.close()
     traceback.print_exc(file=sys.stdout)
Exemplo n.º 2
0
for i in range(-6,1):
    folder = "flux3.5e"+str(i)
    flux = float("3.5e"+str(i))
    print(folder)
    try:
        os.chdir(folder)
        meanValues = mk.getIslandDistribution(temperatures, False, False)
    except OSError:
        print ("error changing to {}".format(folder))
        a = 0 #do nothing
    os.chdir(workingPath)

    totalRatio = (meanValues.getTotalRatio()/(flux**0.81))**(1)
    x = totalRatio
    y = f.fractalD(x)
    gyradius = meanValues.getGyradiusSlope()
    f = math.pi
    c = 4e-1
    d = np.array(y)
    Rtt = mk.getRtt(temperatures)
    gyradiusCalc = (flux*0.7/(d*(f*c)**(1/d)*0.3**(1-1/d)))*(np.array(Rtt)/flux)**(0.33/d)
    r = np.array(Rtt)/flux**0.36
    inverseTemperature = 1/(kb*np.array(temperatures))
    plt.semilogy(inverseTemperature, gyradius, "-", label="gyradius "+folder)
    plt.semilogy(inverseTemperature, gyradiusCalc, "--", label="gyradius calc "+folder)
    if (i < -7):
        popt = curve_fit(f.power, r, totalRatio)
        a = popt[0][0]
        b = popt[0][1]
        a = 8e-11
Exemplo n.º 3
0
for i in range(-6, 1):
    folder = "flux3.5e" + str(i)
    flux = float("3.5e" + str(i))
    print(folder)
    try:
        os.chdir(folder)
        meanValues = mk.getIslandDistribution(temperatures, False, False)
    except OSError:
        print("error changing to flux {}".format(folder))

    os.chdir(workingPath)
    vs = meanValues.getGrowthSlope()
    s = (0.3 * 400 * 400) / meanValues.getIslandsAmount()
    vg = meanValues.getGyradiusSlope()
    rtt = mk.getRtt(temperatures)
    d = f.fractalD(rtt / flux)
    rg = meanValues.getLastGyradius()
    print(len(d), len(s), len(rg))
    y = d * (s / rg)**2
    x = meanValues.getTotalRatio()
    print(len(x), len(y))
    try:
        plt.loglog(x, y, label=folder)
        plt.legend(loc='upper left', prop={'size': 6})
        plt.savefig("dSRgVsRate.png")
    except ValueError:
        print("error plotting")

plt.close()

print("Good bye!")
Exemplo n.º 4
0
    verbose = False
    print(folder)
    try:
        os.chdir(folder)
        meanValues = mk.getIslandDistribution(temperatures, sqrt, interval,
                                              growth, verbose, flux,
                                              maxCoverage)
    except OSError:
        print("error changing to {}".format(folder))
        a = 0  #do nothing
    os.chdir(workingPath)

    rtt = mk.getRtt(temperatures)
    growthSlope = meanValues.getGrowthSlope()
    totalRatio = meanValues.getTotalRatio()
    fractalD = f.fractalD(rtt / flux**0.5)
    shapeF = mk.shapeFactorFunc(rtt / flux**0.5)
    gyradius = meanValues.getGyradiusSlope()
    n = meanValues.getIslandsAmount()
    perimeterSlopes = meanValues.getInnerPerimeterSlope()
    numberOfMonomers = meanValues.getMonomersAmount()
    simulatedTimes = meanValues.getTimes()

    filename = "outputFile" + '{:E}'.format(flux) + ".txt"
    with open(filename, 'w', newline='') as csvfile:
        outwriter = csv.writer(csvfile,
                               delimiter=' ',
                               quotechar='|',
                               quoting=csv.QUOTE_MINIMAL)
        outwriter.writerow([
            "%index", "temp", "flux", "rtt[index]", "fractalD[index]",
Exemplo n.º 5
0
    vsM = meanValues.growthSlopes
    fs = meanValues.getFluctuationSizes()
    vsPrime = np.maximum(vs, (1 + fs**(4 / 3)) * flux**1.08)
    N = (0.3 * 400 * 400) / meanValues.getIslandsAmount()
    N = meanValues.getIslandsAmount()
    N2 = meanValues.getIslandsAmount2()
    n = meanValues.getMonomersAmount()
    fn = meanValues.getFluctuationMonomers()
    s = meanValues.getSizes()
    fN = meanValues.getFluctuationIslandAmount()
    fn = meanValues.getFluctuationMonomers()
    vn = meanValues.getMonomersSlope()
    vg = meanValues.getGyradiusSlope()
    vN = meanValues.getIslandsAmountSlope()
    rtt = mk.getRtt(temperatures)
    d = f.fractalD(rtt / 3.5e-1)
    d0 = f.fractalD(rtt / flux)

    #d = mk.readFractalD(flux)
    rg = meanValues.getLastGyradius()
    vpi = meanValues.getInnerPerimeterSlope()
    vpo = meanValues.getOuterPerimeterSlope()
    pi = meanValues.getLastInnerPerimeter()
    po = meanValues.getLastOuterPerimeter()
    fpi = meanValues.getFluctuationInnerPerimeter()
    fpo = meanValues.getFluctuationOuterPerimeter()
    t = meanValues.getTimes()
    r = np.array([
        i if i > 1 else float('nan') for i in meanValues.getTotalRatio()
    ]).astype(float)
    #r = meanValues.totalRatio()