mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
renamed start and end stage parameters; removed unused 'regenerate' flag
This commit is contained in:
parent
4c48221699
commit
ccc2d67cf1
7 changed files with 24 additions and 58 deletions
|
@ -52,20 +52,15 @@ class Bunch:
|
|||
# -----------------------------------------------------------------------------
|
||||
def launchPrep(sample, binPath, workDir=None, inputDataDir=None,
|
||||
outputDir=None, figDir=None, logFile=None, useComoving=False,
|
||||
continueRun=None, regenerate=False):
|
||||
continueRun=None):
|
||||
|
||||
startTime = time.time()
|
||||
|
||||
if sample.dataType == "observation":
|
||||
sampleName = sample.fullName
|
||||
|
||||
if regenerate:
|
||||
inputParameterFlag = "inputParameter " + outputDir + \
|
||||
"/zobov_slice_"+sampleName+".par"
|
||||
outputFile = outputDir + "/regenerated_zobov_slice_" + sampleName
|
||||
else:
|
||||
inputParameterFlag = ""
|
||||
outputFile = outputDir + "/zobov_slice_" + sampleName
|
||||
inputParameterFlag = ""
|
||||
outputFile = outputDir + "/zobov_slice_" + sampleName
|
||||
|
||||
if sample.dataFile == "":
|
||||
datafile = inputDataDir+"/"+sampleName
|
||||
|
@ -103,7 +98,7 @@ def launchPrep(sample, binPath, workDir=None, inputDataDir=None,
|
|||
|
||||
parmFile = os.getcwd()+"/prep_"+sample.fullName+".par"
|
||||
|
||||
if regenerate or not (continueRun and jobSuccessful(logFile, "Done!\n")):
|
||||
if not (continueRun and jobSuccessful(logFile, "Done!\n")):
|
||||
with open(parmFile, mode="wt") as f:
|
||||
f.write(conf)
|
||||
|
||||
|
@ -453,8 +448,6 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
|
|||
kind='cubic', bounds_error=False,
|
||||
fill_value=1.0)
|
||||
# re-weight and write
|
||||
## TEST
|
||||
#redshifts /= 10000.
|
||||
for i in range(len(vols)):
|
||||
vols[i] *= selfunc(redshifts[i])
|
||||
|
||||
|
@ -573,8 +566,7 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
|
|||
# -----------------------------------------------------------------------------
|
||||
def launchPrune(sample, binPath,
|
||||
summaryFile=None, logFile=None, outputDir=None,
|
||||
continueRun=None, useComoving=False, mergingThreshold=0.2,
|
||||
boundaryTolerance=1.0):
|
||||
continueRun=None, useComoving=False, mergingThreshold=0.2):
|
||||
|
||||
startTime = time.time()
|
||||
|
||||
|
@ -626,7 +618,6 @@ def launchPrune(sample, binPath,
|
|||
cmd += " --partAdj=" + outputDir+"/adj_"+str(sampleName)+".dat"
|
||||
cmd += " --partEdge=" + outputDir+"galaxy_edge_flags.txt"
|
||||
cmd += " --extraInfo=" + outputDir+"/zobov_slice_"+str(sampleName)+".par"
|
||||
cmd += " --tolerance=" + str(boundaryTolerance)
|
||||
cmd += " --maxCentralDen=" + str(maxDen)
|
||||
cmd += " --rMin=" + str(minRadius)
|
||||
cmd += " --numVoids=" + str(numVoids)
|
||||
|
@ -638,7 +629,6 @@ def launchPrune(sample, binPath,
|
|||
cmd += " --outputDir=" + outputDir
|
||||
cmd += " --sampleName=" + str(sampleName)
|
||||
log = open(logFile, 'w')
|
||||
#log.write(f"Command is {cmd}\n")
|
||||
subprocess.call(cmd, stdout=log, stderr=log, shell=True)
|
||||
log.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue