mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +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
|
@ -43,12 +43,10 @@ if (len(sys.argv) > 1):
|
|||
print(" Cannot find parameter file %s!" % filename)
|
||||
exit(-1)
|
||||
parms = imp.load_source("name", filename)
|
||||
regenerateFlag = False
|
||||
globals().update(vars(parms))
|
||||
void_path = os.path.split(voidUtil.__file__)[0]
|
||||
ZOBOV_PATH=f'{void_path}/../vide/bin/' # this needs to be cleaned up
|
||||
CTOOLS_PATH=ZOBOV_PATH
|
||||
#print(f"ZOBOV_PATH is {ZOBOV_PATH}")
|
||||
else:
|
||||
print(" Using default parameters")
|
||||
|
||||
|
@ -64,11 +62,11 @@ if not os.access(figDir, os.F_OK):
|
|||
if not continueRun:
|
||||
print(" Cleaning out log files...")
|
||||
|
||||
if startCatalogStage <= 1 and glob.glob(logDir+"/prepare*") != []:
|
||||
if startStage <= 1 and glob.glob(logDir+"/prepare*") != []:
|
||||
os.system("rm %s/prepare*" % logDir)
|
||||
if startCatalogStage <= 2 and glob.glob(logDir+"/zobov*") != []:
|
||||
if startStage <= 2 and glob.glob(logDir+"/zobov*") != []:
|
||||
os.system("rm %s/zobov*" % logDir)
|
||||
if startCatalogStage <= 3 and glob.glob(logDir+"/prune*") != []:
|
||||
if startStage <= 3 and glob.glob(logDir+"/prune*") != []:
|
||||
os.system("rm %s/prune*" % logDir)
|
||||
|
||||
for sample in dataSampleList:
|
||||
|
@ -83,7 +81,7 @@ for sample in dataSampleList:
|
|||
os.makedirs(outputDir)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
if (startCatalogStage <= 1) and (endCatalogStage >= 1) and not sample.isCombo:
|
||||
if (startStage <= 1) and (endStage >= 1) and not sample.isCombo:
|
||||
print(" Preparing tracers from catalog...", end='')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
@ -97,10 +95,10 @@ for sample in dataSampleList:
|
|||
launchPrep(sample, PREPARE_PATH, workDir=workDir,
|
||||
inputDataDir=inputDataDir, outputDir=outputDir,
|
||||
figDir=figDir, logFile=logFile, useComoving=sample.useComoving,
|
||||
continueRun=continueRun, regenerate=regenerateFlag)
|
||||
continueRun=continueRun)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
if (startCatalogStage <= 2) and (endCatalogStage >= 2) and not sample.isCombo:
|
||||
if (startStage <= 2) and (endStage >= 2) and not sample.isCombo:
|
||||
print(" Finding voids...", end='')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
@ -110,7 +108,7 @@ for sample in dataSampleList:
|
|||
mergingThreshold=mergingThreshold)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
|
||||
if (startStage <= 3) and (endStage >= 3) and not sample.isCombo:
|
||||
|
||||
print(" Pruning void catalogs...", end='')
|
||||
sys.stdout.flush()
|
||||
|
@ -124,20 +122,4 @@ for sample in dataSampleList:
|
|||
useComoving=sample.useComoving, continueRun=continueRun,
|
||||
mergingThreshold=mergingThreshold)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
if (startCatalogStage <= 4) and (endCatalogStage >= 4):
|
||||
|
||||
print(" Plotting...", end='')
|
||||
sys.stdout.flush()
|
||||
|
||||
#for thisDataPortion in dataPortions:
|
||||
#plotRedshiftDistribution(workDir, dataSampleList, figDir, showPlot=False,
|
||||
# dataPortion=thisDataPortion, setName=setName)
|
||||
#plotSizeDistribution(workDir, dataSampleList, figDir, showPlot=False,
|
||||
# dataPortion=thisDataPortion, setName=setName)
|
||||
#plotNumberDistribution(workDir, dataSampleList, figDir, showPlot=False,
|
||||
# dataPortion=thisDataPortion, setName=setName)
|
||||
#plotVoidDistribution(workDir, dataSampleList, figDir, showPlot=False,
|
||||
# dataPortion=thisDataPortion, setName=setName)
|
||||
|
||||
print("\n VIDE finished!")
|
||||
|
|
|
@ -165,14 +165,14 @@ import os
|
|||
from backend.classes import *
|
||||
|
||||
continueRun = {continueRun} # set to True to enable restarting aborted jobs
|
||||
startCatalogStage = {startCatalogStage}
|
||||
endCatalogStage = {endCatalogStage}
|
||||
startStage = {startStage}
|
||||
endStage = {endStage}
|
||||
|
||||
dataSampleList = []
|
||||
"""
|
||||
|
||||
scriptFile.write(header.format(startCatalogStage=startCatalogStage,
|
||||
endCatalogStage=endCatalogStage,
|
||||
scriptFile.write(header.format(startStage=startStage,
|
||||
endStage=endStage,
|
||||
continueRun=continueRun,
|
||||
))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue