From 03d28e8e03b8f01f774f1bfde6876d7077b810e8 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Thu, 6 Feb 2014 05:18:25 -0600 Subject: [PATCH] ahf particle files treated as gadget files --- .../void_python_tools/backend/launchers.py | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/python_tools/void_python_tools/backend/launchers.py b/python_tools/void_python_tools/backend/launchers.py index 530fb01..413f9da 100644 --- a/python_tools/void_python_tools/backend/launchers.py +++ b/python_tools/void_python_tools/backend/launchers.py @@ -167,6 +167,8 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None, dataFileLine = "multidark " + datafile elif sample.dataFormat == "gadget": dataFileLine = "gadget " + datafile + elif sample.dataFormat == "ahf": + dataFileLine = "gadget " + datafile elif sample.dataFormat == "sdf": dataFileLine = "sdf " + datafile else: @@ -1230,22 +1232,21 @@ def launchFit(sample, stack, logFile=None, voidDir=None, figDir=None, Rexpect = (stack.rMin+stack.rMax)/2 Rtruncate = stack.rMin*3. + 1 # TEST - #if sample.dataType == "observation": - # ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect, - # Niter=300000, - # Nburn=100000, - # Rextracut=Rtruncate) - #else: - # ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect, - # Niter=300000, - # Nburn=100000, - # Rextracut=Rtruncate) - #badChain = (args[0][0] > 0.5 or args[0][1] > 2.*stack.rMax or \ - # args[0][2] > 2.*stack.rMax) and \ - # (ntries < maxtries) - ret,fits,args = vp.compute_inertia(voidDir, stack.rMax, mode="2d", nBootstraps=500, rMaxInertia=0.7) - #ret,fits,args = vp.compute_inertia(voidDir, stack.rMax, mode="symmetric", nBootstraps=500, rMaxInertia=100) - badChain = False + if sample.dataType == "observation": + ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect, + Niter=300000, + Nburn=100000, + Rextracut=Rtruncate) + else: + ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect, + Niter=300000, + Nburn=100000, + Rextracut=Rtruncate) + badChain = (args[0][0] > 0.5 or args[0][1] > 2.*stack.rMax or \ + args[0][2] > 2.*stack.rMax) and \ + (ntries < maxtries) + #ret,fits,args = vp.compute_inertia(voidDir, stack.rMax, mode="2d", nBootstraps=500, rMaxInertia=0.7) + #badChain = False #np.save(voidDir+"/chain.npy", ret) np.savetxt(voidDir+"/fits.out", fits)