fixed bug for data unit, and fixed bug for detecting completion of pruning

This commit is contained in:
P.M. Sutter 2012-11-09 07:10:08 -06:00
parent ed3f18f6d0
commit 9c10c3714f
2 changed files with 4 additions and 2 deletions

View file

@ -38,6 +38,7 @@ class Sample:
dataType = "observation"
dataFormat = "sdss"
dataFile = "lss.dr72dim.dat"
dataUNit = 1
fullName = "lss.dr72dim.dat"
nickName = "dim"
zobovDir = ""
@ -68,7 +69,7 @@ class Sample:
stacks = []
def __init__(self, dataFile="", fullName="",
def __init__(self, dataFile="", fullName="", dataUnit=1,
nickName="", maskFile="", selFunFile="",
zBoundary=(), zRange=(), zBoundaryMpc=(),
minVoidRadius=0, fakeDensity=0.01, volumeLimited=True,
@ -106,6 +107,7 @@ class Sample:
self.dataFormat = dataFormat
self.subsample = subsample
self.useLightCone = useLightCone
self.dataUnit = dataUnit
self.stacks = []

View file

@ -287,7 +287,7 @@ def launchPrune(sample, binPath, thisDataPortion=None,
cmd += " >& " + logFile
os.system(cmd)
if jobSuccessful(logFile, "NetCDF: Not a valid ID\n"):
if jobSuccessful(logFile, "NetCDF: Not a valid ID\n") or jobSuccessful(logFile, "Done!"):
print "done"
else:
print "FAILED!"