mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
removed unused launcher helper routines
This commit is contained in:
parent
83d0d66d90
commit
b03343f403
1 changed files with 0 additions and 129 deletions
|
@ -643,132 +643,3 @@ def launchPrune(sample, binPath,
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("already done!")
|
print("already done!")
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
def launchVoidOverlap(sample1, sample2, sample1Dir, sample2Dir,
|
|
||||||
binPath, thisDataPortion=None,
|
|
||||||
logFile=None,
|
|
||||||
continueRun=None, outputFile=None,
|
|
||||||
overlapFrac=0.25,
|
|
||||||
matchMethod=None, strictMatch=False):
|
|
||||||
|
|
||||||
startTime = time.time()
|
|
||||||
|
|
||||||
sampleName1 = sample1.fullName
|
|
||||||
sampleName2 = sample2.fullName
|
|
||||||
|
|
||||||
periodicLine = " --periodic='" + getPeriodic(sample1) + "' "
|
|
||||||
|
|
||||||
if strictMatch:
|
|
||||||
matchPrefix = ""
|
|
||||||
else:
|
|
||||||
matchPrefix = "trimmed_nodencut_"
|
|
||||||
|
|
||||||
if sample1.dataType == "observation" or sample2.dataType == "observation":
|
|
||||||
observationLine = " --isObservation"
|
|
||||||
else:
|
|
||||||
observationLine = ""
|
|
||||||
|
|
||||||
if not (continueRun and jobSuccessful(logFile, "Done!\n")):
|
|
||||||
cmd = binPath
|
|
||||||
cmd += " --partFile1=" + sample1Dir+"/zobov_slice_" + \
|
|
||||||
str(sampleName1)
|
|
||||||
cmd += " --volFile1=" + sample1Dir+"/vol_" + \
|
|
||||||
str(sampleName1)+".dat"
|
|
||||||
cmd += " --voidFile1=" + sample1Dir+"/voidDesc_" + \
|
|
||||||
thisDataPortion+"_"+str(sampleName1)+".out"
|
|
||||||
cmd += " --infoFile1=" + sample1Dir+"/zobov_slice_" + \
|
|
||||||
str(sampleName1)+".par"
|
|
||||||
cmd += " --centerFile1=" + sample1Dir + \
|
|
||||||
"/macrocenters_"+thisDataPortion+"_"+str(sampleName1)+".out"
|
|
||||||
cmd += " --shapeFile1=" + sample1Dir + \
|
|
||||||
"/shapes_"+thisDataPortion+"_"+str(sampleName1)+".out"
|
|
||||||
cmd += " --zoneFile1=" + sample1Dir+"/voidZone_" + \
|
|
||||||
str(sampleName1)+".dat"
|
|
||||||
cmd += " --zonePartFile1=" + sample1Dir+"/voidPart_" + \
|
|
||||||
str(sampleName1)+".dat"
|
|
||||||
|
|
||||||
cmd += " --partFile2=" + sample2Dir+"/zobov_slice_" + \
|
|
||||||
str(sampleName2)
|
|
||||||
cmd += " --volFile2=" + sample2Dir+"/vol_" + \
|
|
||||||
str(sampleName2)+".dat"
|
|
||||||
cmd += " --voidFile2=" + sample2Dir+"/"+matchPrefix+"voidDesc_" + \
|
|
||||||
thisDataPortion+"_"+str(sampleName2)+".out"
|
|
||||||
cmd += " --infoFile2=" + sample2Dir+"/zobov_slice_" + \
|
|
||||||
str(sampleName2)+".par"
|
|
||||||
cmd += " --centerFile2=" + sample2Dir + \
|
|
||||||
"/"+matchPrefix+"macrocenters_"+thisDataPortion+"_"+str(sampleName2)+".out"
|
|
||||||
cmd += " --shapeFile2=" + sample2Dir + \
|
|
||||||
"/"+matchPrefix+"shapes_"+thisDataPortion+"_"+str(sampleName2)+".out"
|
|
||||||
cmd += " --zoneFile2=" + sample2Dir+"/voidZone_" + \
|
|
||||||
str(sampleName2)+".dat"
|
|
||||||
cmd += " --zonePartFile2=" + sample2Dir+"/voidPart_" + \
|
|
||||||
str(sampleName2)+".dat"
|
|
||||||
|
|
||||||
cmd += " --overlapFrac=" + str(overlapFrac)
|
|
||||||
|
|
||||||
cmd += observationLine
|
|
||||||
|
|
||||||
if matchMethod == "useID": cmd += " --useID"
|
|
||||||
cmd += periodicLine
|
|
||||||
cmd += " --outfile=" + outputFile
|
|
||||||
#cmd += " &> " + logFile
|
|
||||||
#open("temp.par",'w').write(cmd)
|
|
||||||
#os.system(cmd)
|
|
||||||
log = open(logFile, 'w')
|
|
||||||
subprocess.call(cmd, stdout=log, stderr=log, shell=True)
|
|
||||||
log.close()
|
|
||||||
|
|
||||||
#if jobSuccessful(logFile, "Done!\n"):
|
|
||||||
endTime = time.time()
|
|
||||||
walltime = endTime - startTime
|
|
||||||
print("done (%.2fs elapsed)" % walltime)
|
|
||||||
#else:
|
|
||||||
# print "FAILED!"
|
|
||||||
# exit(-1)
|
|
||||||
|
|
||||||
else:
|
|
||||||
print("already done!")
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
def launchVelocityStack(sample, stack, binPath,
|
|
||||||
velField_file,
|
|
||||||
thisDataPortion=None, logDir=None,
|
|
||||||
voidDir=None, runSuffix=None,
|
|
||||||
outputDir=None,
|
|
||||||
summaryFile=None,
|
|
||||||
continueRun=None, dataType=None, prefixRun=""):
|
|
||||||
|
|
||||||
sampleName = sample.fullName
|
|
||||||
|
|
||||||
runSuffix = getStackSuffix(stack.zMin, stack.zMax, stack.rMin,
|
|
||||||
stack.rMax, thisDataPortion)
|
|
||||||
|
|
||||||
logFile = logDir+("/%svelocity_stack_"%prefixRun)+sampleName+"_"+runSuffix+".out"
|
|
||||||
|
|
||||||
voidCenters=voidDir+"/centers.txt"
|
|
||||||
# Rmax =
|
|
||||||
|
|
||||||
centralRadius = stack.rMin * 0.25
|
|
||||||
Rextracut = stack.rMax*3 + 1
|
|
||||||
Rcircular = stack.rMax*3 + 2
|
|
||||||
|
|
||||||
parameters="--velocityField=%s --voidCenters=%s --Rmax=%e --L0=%e --numBins=%d" % (velField_file, voidCenters, Rmax, Boxsize, numBins)
|
|
||||||
|
|
||||||
if not (continueRun and jobSuccessful(logFile, "Done!\n")):
|
|
||||||
#cmd = "%s %s &> %s" % (binPath,parameters,logFile)
|
|
||||||
#os.system(cmd)
|
|
||||||
cmd = "%s %s" % (binPath,parameters)
|
|
||||||
log = open(logFile, 'w')
|
|
||||||
subprocess.call(cmd, stdout=log, stderr=log, shell=True)
|
|
||||||
log.close()
|
|
||||||
if jobSuccessful(logFile, "Done!\n"):
|
|
||||||
print("done")
|
|
||||||
else:
|
|
||||||
print("FAILED! See log file for details.")
|
|
||||||
exit(-1)
|
|
||||||
|
|
||||||
else:
|
|
||||||
print("already done!")
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue