From 6e18299ade1bcd7a321e5614c3da6173fb7bc69b Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Fri, 7 Dec 2012 08:11:28 -0600 Subject: [PATCH] another attempt at making the jobSuccessful call work; some other minor fixes --- c_tools/mock/generateMock.cpp | 2 +- python_tools/void_python_tools/backend/classes.py | 9 +++++---- python_tools/void_python_tools/backend/launchers.py | 4 ++-- python_tools/void_python_tools/plotting/plotTools.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/c_tools/mock/generateMock.cpp b/c_tools/mock/generateMock.cpp index 6dd3ef8..27890f4 100644 --- a/c_tools/mock/generateMock.cpp +++ b/c_tools/mock/generateMock.cpp @@ -200,7 +200,7 @@ void generateOutput(SimuData *data, int axis, f.beginCheckpoint(); for (uint32_t i = 0; i < data->NumPart; i++) { - f.writeReal32(data->Pos[x2][i]); + f.writeReal32(data->Pos[x2][i]*LIGHT_SPEED); } f.endCheckpoint(); diff --git a/python_tools/void_python_tools/backend/classes.py b/python_tools/void_python_tools/backend/classes.py index 18c2ffc..a6d2052 100755 --- a/python_tools/void_python_tools/backend/classes.py +++ b/python_tools/void_python_tools/backend/classes.py @@ -158,10 +158,11 @@ def jobSuccessful(logFile, doneString): jobDone = False checkLine = "" if os.access(logFile, os.F_OK): - filelines = file(logFile, "r").readlines() - if len(filelines) >= 1: - checkLine = filelines[-1] - jobDone = (checkLine == doneString) + #filelines = file(logFile, "r").readlines() + #if len(filelines) >= 1: + # checkLine = filelines[-1] + for line in open(logFile, 'r'): + if doneString in line: jobDone = True return jobDone def getStackSuffix(zMin, zMax, rMin, rMax, dataPortion): diff --git a/python_tools/void_python_tools/backend/launchers.py b/python_tools/void_python_tools/backend/launchers.py index a6f94a7..ec53388 100755 --- a/python_tools/void_python_tools/backend/launchers.py +++ b/python_tools/void_python_tools/backend/launchers.py @@ -379,8 +379,8 @@ def launchStack(sample, stack, binPath, thisDataPortion=None, logDir=None, %s ranSeed %d dataPortion %s - #barycenters %s - #boundaryDistances %s + barycenters %s + boundaryDistances %s %s """ % \ (zobovDir+"/voidDesc_"+thisDataPortion+"_"+sampleName+".out", diff --git a/python_tools/void_python_tools/plotting/plotTools.py b/python_tools/void_python_tools/plotting/plotTools.py index c36ecad..8f51f7d 100644 --- a/python_tools/void_python_tools/plotting/plotTools.py +++ b/python_tools/void_python_tools/plotting/plotTools.py @@ -240,7 +240,7 @@ def plotNumberDistribution(workDir=None, sampleList=None, figDir=None, boxVol = vp.getSurveyProps(sample.maskFile, sample.zBoundary[0], sample.zBoundary[1], sample.zRange[0], sample.zRange[1], "all", - selectionFuncFile=sample.selFunFile)[0] + selectionFuncFile=None)[0] else: boxVol = sample.boxLen*sample.boxLen*(sample.zBoundaryMpc[1] - sample.zBoundaryMpc[0])