mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
further improvements to void overlap stuff
This commit is contained in:
parent
3539eaacb4
commit
3dd1281cc9
2 changed files with 65 additions and 61 deletions
|
@ -33,7 +33,7 @@ globals().update(vars(parms))
|
|||
if not os.access(figDir, os.F_OK):
|
||||
os.makedirs(figDir)
|
||||
|
||||
outFileName = dataDir + "/" + dataNameBase + ".dat"
|
||||
outFileName = dataDir + "/" + dataNameBase #+ ".dat"
|
||||
|
||||
for (iSample, sampleDir) in enumerate(sampleDirList):
|
||||
if iSample == 0: continue
|
||||
|
@ -50,7 +50,8 @@ for (iSample, sampleDir) in enumerate(sampleDirList):
|
|||
|
||||
binPath = CTOOLS_PATH+"/analysis/voidOverlap"
|
||||
logFile = os.getcwd()+"/mergerTree.log"
|
||||
stepOutputFileName = os.getcwd()+"/thisStep.out"
|
||||
stepOutputFileName = outFileName + "_" + sampleName + "_"
|
||||
#stepOutputFileName = os.getcwd()+"/data/overlap_"
|
||||
|
||||
launchVoidOverlap(baseSample, sample, workDir+sampleDirList[0],
|
||||
workDir+sampleDir, binPath,
|
||||
|
@ -59,23 +60,23 @@ for (iSample, sampleDir) in enumerate(sampleDirList):
|
|||
outputFile=stepOutputFileName)
|
||||
|
||||
# attach columns to summary file
|
||||
if iSample == 1:
|
||||
os.system("cp %s %s" % (stepOutputFileName, outFileName))
|
||||
else:
|
||||
outFile = open("temp.out", "w")
|
||||
stepOutFile1 = open(outFileName, "r")
|
||||
stepOutFile2 = open(stepOutputFileName, "r")
|
||||
|
||||
for line1 in stepOutFile1:
|
||||
line1 = line1.rstrip()
|
||||
line2 = stepOutFile2.readline()
|
||||
outFile.write(line1+" "+line2)
|
||||
|
||||
os.system("cp %s %s" % ("temp.out", outFileName))
|
||||
outFile.close()
|
||||
stepOutFile1.close()
|
||||
stepOutFile2.close()
|
||||
#if iSample == 1:
|
||||
# os.system("cp %s %s" % (stepOutputFileName, outFileName))
|
||||
#else:
|
||||
# outFile = open("temp.out", "w")
|
||||
# stepOutFile1 = open(outFileName, "r")
|
||||
# stepOutFile2 = open(stepOutputFileName, "r")
|
||||
#
|
||||
# for line1 in stepOutFile1:
|
||||
# line1 = line1.rstrip()
|
||||
# line2 = stepOutFile2.readline()
|
||||
# outFile.write(line1+" "+line2)
|
||||
#
|
||||
# os.system("cp %s %s" % ("temp.out", outFileName))
|
||||
# outFile.close()
|
||||
# stepOutFile1.close()
|
||||
# stepOutFile2.close()
|
||||
|
||||
#if os.access("mergerTree.log", os.F_OK): os.unlink("mergerTree.log")
|
||||
if os.access("temp.out", os.F_OK): os.unlink("temp.out")
|
||||
#if os.access("temp.out", os.F_OK): os.unlink("temp.out")
|
||||
#if os.access("thisStep.out", os.F_OK): os.unlink("thisStep.out")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue