valfunc = lambda x,y,z: -x/y*z/(z**2+((2*math.pi/24*sigmaterm)**2)/3) elif op == "O012": valfunc = lambda x,y,z: -x/y/((2*math.pi/24*sigmaterm)**2) elif op == "O0ii": valfunc = lambda x,y,z: -x/y*2/((2*math.pi/24*sigmaterm)**2) print runr.getopcf(op,sigma)+","+runr.getopcf("x",sigma)+","+destdir+","+str(latT)+","+str(numBstraps)+","+str(doasym) a.calcplatval(runr.getopcf(op,sigma),runr.getopcf("x",sigma),destdir,latT,numBstraps,valfunc,wpe) elif task == "autocorr_bstrap": data = a.readcor(runr.getopcf(op,sigma),latT) if runr.istrue("wpe"): data = a.sym_wope(data) else: data = a.sym(data) errors = a.autocorr_bstrap(data,int(taskr.rparam("start")),int(taskr.rparam("end")),numBstraps) a.plotautocorr_bstrap(errors,os.path.join(destdir,"autocorr_bstrap.pdf")) elif task == "mwerr": data = a.readcor(runr.getopcf(op,sigma),latT) if runr.istrue("wpe"): data = a.sym_wope(data) data = data[:,1:len(data[0])-1] else: data = a.sym(data) databstraps = a.boot(data,numBstraps)
sys.path.insert(0,parentdir) import a sigma = int(sys.argv[1]) print "sigma "+str(sigma) a.ensure_dir("/hiskp2/oehm/correlators/momentum/A40.24/O012/analysis/sigma"+str(sigma)+"/") numBootstraps = 1500 O012 = a.readcor("/hiskp2/oehm/correlators/momentum/A40.24/O012/sigma"+str(sigma)+"/O012_sigma"+str(sigma),48) xn = a.readcor("/hiskp2/oehm/correlators/momentum/A40.24/x/sigma"+str(sigma)+"/x"+str(sigma),48) O012 = a.asym(O012) xn = a.sym(xn) O012_bstraps = a.boot(O012,numBootstraps) O012_bstraps_mean = np.mean(O012_bstraps,axis=0) xn_bstraps = a.boot(xn,numBootstraps) xn_bstraps_mean = np.mean(xn_bstraps,axis=0) xn_result = np.zeros((21,numBootstraps,4)) effmass, effmass_error, effmass_nans = a.effmass(xn_bstraps) print effmass xnfunc = lambda p,x: p[0]*(np.exp(-x*p[1])+np.exp(-(48-x)*p[1])) O012_func = lambda p,x: p[0] tt = []
if not os.path.exists(d): os.makedirs(d) numBootstraps = 1500 lattice = sys.argv[1] print "destdir: "+"/hiskp2/oehm/averx/analysis/"+lattice+"/" T = int(sys.argv[2]) print "T: "+str(T) ensure_dir("/hiskp2/oehm/averx/analysis/"+lattice+"/") O44 = a.readcor("/hiskp2/oehm/averx/"+lattice+"/maxmomf2e",T) xn = a.readcor("/hiskp2/oehm/averx/"+lattice+"/maxppcor",T) O44 = a.sym(O44) xn = a.sym(xn) O44_bstraps = a.boot(O44,numBootstraps) O44_bstraps_mean = np.mean(O44_bstraps,axis=0) xn_bstraps = a.boot(xn,numBootstraps) xn_bstraps_mean = np.mean(xn_bstraps,axis=0) xn_result = np.zeros((T/2+1-4,numBootstraps,4)) effmass, effmass_error, effmass_nans = a.effmass(xn_bstraps) print effmass xnfunc = lambda p,x: p[0]*(np.exp(-x*p[1])+np.exp(-(T-x)*p[1])) O44_func = lambda p,x: p[0]