number of zobov threads and subdivisions now part of dataset definition

This commit is contained in:
P.M. Sutter 2012-11-15 07:31:41 -06:00
parent 6868a026f5
commit b6359bb0a9
5 changed files with 21 additions and 12 deletions

View file

@ -63,7 +63,6 @@ class Sample:
usePecVel = False
subsample = 1.0
useLightCone = True
numSubDivisions = 1
numSubvolumes = 1
mySubvolume = 1
@ -75,9 +74,9 @@ class Sample:
minVoidRadius=0, fakeDensity=0.01, volumeLimited=True,
includeInHubble=True, partOfCombo=False, isCombo=False,
comboList=(), profileBinSize=2.0, skyFraction=0.19,
dataType="observation", numSubDivisions=2,
boxLen=1024, usePecVel=False, omegaM=0.27,
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
dataType="observation",
subsample=1.0, useLightCone=True):
self.dataFile = dataFile
self.fullName = fullName
@ -98,7 +97,6 @@ class Sample:
self.profileBinSize = profileBinSize
self.skyFraction = skyFraction
self.dataType = dataType
self.numSubDivisions = numSubDivisions
self.boxLen = boxLen
self.usePecVel = usePecVel
self.omegaM = omegaM

View file

@ -166,7 +166,8 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
os.unlink(parmFile)
# -----------------------------------------------------------------------------
def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None):
def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None,
numZobovDivisions=None, numZobovThreads=None):
sampleName = sample.fullName
@ -197,11 +198,9 @@ def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None):
if os.access(zobovDir+"/voidDesc_"+sampleName+".out", os.F_OK):
os.unlink(zobovDir+"/voidDesc_"+sampleName+".out")
numThreads = 2
cmd = "%s/vozinit %s 0.1 1.0 %g %s %g %s %s %s >& %s" % \
(binPath, datafile, sample.numSubDivisions, \
"_"+sampleName, numThreads, \
(binPath, datafile, numZobovDivisions, \
"_"+sampleName, numZobovThreads, \
binPath, zobovDir, maskIndex, logFile)
os.system(cmd)