def plotSimul(axR2, axR2Sca, dirList, strF2B, strB2F, strB2B, strHrad, strBrad, strNtrials ): lblB2B = latex_float( float(strB2B) ) flag = False idir = 0 while idir < len(dirList): try: sd = SimulData() #print dirList[idir] flnPrefix02 = dirList[idir]+flnPrefix sd.metadata(flnPrefix02, strF2B, strB2F, strB2B, strHrad, strBrad, strNtrials ) sd.getData() estilo = lineStyDAT(sd) # titulo = "$p_{FB} = "+lblF2B+", p_{BF} = "+lblB2F+", p_{BB} = "+lblB2B+", R_H = "+strHrad+"$" # if fit_params[strHrad]["lambFlag"]: # Figuras[hr], Conexions[hr] = sd.calcDwithLamb(fit_params[strHrad], colorcito, titulo) # else: # sd.calcDiffCoeff(fit_params[strHrad]) # DiffCoeff[hr] = sd.DiffCoeff # D_err_mim[hr] = sd.D_err_min # D_err_max[hr] = sd.D_err_max axR2.plot(sd.ttime, sd.DelR2, **estilo) #axR2.plot(sd.ttime[sd.imin:sd.imax], line(sd.ttime[sd.imin:sd.imax], sd.popt[0], sd.popt[1]), '--', color='k' ) scaXX, scaYY = ScaleFunction(sd) #linea, = axR2Sca.plot(sd.pB2B*sd.ttime/sd.Hrad**2.0, sd.DelR2/(sd.pB2B*sd.ttime), **estilo) linea, = axR2Sca.plot(scaXX, scaYY, **estilo) flag = True return flag, linea, estilo['label'] break; except IOError as e: flag = False #print e pass idir = idir + 1 return False, None, None
#ofile.write(linea) for b2b in range(len(strB2BList)): strB2B = strB2BList[b2b] sd = SimulData() try: sd.metadata(flnPrefix, strF2B, strB2F, strB2B, strHrad, strBrad, strNtrials, loadData=False) if sd.isDatafile(): sd.getData() else: sd.metadata(flnPrefix, strF2B, strB2F, strB2B, strHrad, strBrad, "1000", loadData=True) estilo = lineStyle_axR2(sd) #axR2. plot(sd.ttime, sd.DelR2, linewidth=2, color=plt.cm.Blues(colvals[b2f]), label="$ "+strB2F+" $") axR2.plot(sd.pB2B * sd.ttime, sd.DelR2 / (sd.pB2B * sd.ttime), **estilo)