diff --git a/pipeline/generateCatalog.py b/pipeline/generateCatalog.py index 70828ef..a76482b 100755 --- a/pipeline/generateCatalog.py +++ b/pipeline/generateCatalog.py @@ -77,31 +77,6 @@ for sample in dataSampleList: if not os.access(zobovDir, os.F_OK): os.makedirs(zobovDir) - # save this sample's information - with open(zobovDir+"/sample_info.dat", 'w') as output: - pickle.dump(sample, output, pickle.HIGHEST_PROTOCOL) - - fp = open(zobovDir+"/sample_info.txt", 'w') - fp.write("Sample name: %s\n" % sample.fullName) - fp.write("Sample nickname: %s\n" % sample.nickName) - fp.write("Data type: %s\n" % sample.dataType) - fp.write("Redshift range: %f - %f\n" %(sample.zBoundary[0],sample.zBoundary[1])) - - #fp.write("Estimated mean particle separation: %g\n" % sample.minVoidRadius) - - if (sample.dataType == "simulation"): - fp.write("Particles placed on lightcone: %g\n" % sample.useLightCone) - fp.write("Peculiar velocities included: %g\n" % sample.usePecVel) - if (len(sample.subsample) == 1): - fp.write("Additional subsampling fraction: %s\n" % sample.subsample) - else: - fp.write("Additional subsampling fraction: %s\n" % sample.subsample[-1]) - fp.write("Simulation box length (Mpc/h): %g\n" % sample.boxLen) - fp.write("Simulation Omega_M: %g\n" % sample.omegaM) - fp.write("Number of simulation subvolumes: %s\n" % sample.numSubvolumes) - fp.write("My subvolume index: %s\n" % sample.mySubvolume) - fp.close() - # --------------------------------------------------------------------------- if (startCatalogStage <= 1) and (endCatalogStage >= 1) and not sample.isCombo: print " Extracting tracers from catalog...", diff --git a/python_tools/pipeline_source/defaults.py b/python_tools/pipeline_source/defaults.py index 360bfd6..c0b3328 100644 --- a/python_tools/pipeline_source/defaults.py +++ b/python_tools/pipeline_source/defaults.py @@ -121,6 +121,7 @@ haloFileVYCol = 4 haloFileVZCol = 5 haloFileColSep = ',' haloFileNumComLines = 0 +haloFilePosRescale = 1.0 # rescaling necessary to get Mpc/h # adjust these two parameters given the memory contraints on your system: # numZobovDivisions: how many sub-volumes per dimension will zobov process diff --git a/python_tools/pipeline_source/prepareCatalogs.in.py b/python_tools/pipeline_source/prepareCatalogs.in.py index abf8189..e2e28c8 100644 --- a/python_tools/pipeline_source/prepareCatalogs.in.py +++ b/python_tools/pipeline_source/prepareCatalogs.in.py @@ -681,9 +681,9 @@ if (args.halos or args.all) and haloFileBase != "": if iHalo < haloFileNumComLines: continue line = line.split(haloFileColSep) if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass: - x = float(line[haloFileXCol]) - y = float(line[haloFileYCol]) - z = float(line[haloFileZCol]) + x = float(line[haloFileXCol]) * haloFilePosRescale + y = float(line[haloFileYCol]) * haloFilePosRescale + z = float(line[haloFileZCol]) * haloFilePosRescale vz = float(line[haloFileVZCol]) vy = float(line[haloFileVYCol]) vx = float(line[haloFileVXCol]) diff --git a/python_tools/void_python_tools/backend/launchers.py b/python_tools/void_python_tools/backend/launchers.py index b966e83..dab68b9 100644 --- a/python_tools/void_python_tools/backend/launchers.py +++ b/python_tools/void_python_tools/backend/launchers.py @@ -261,7 +261,26 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None, meanSep = (1.*numTracers/boxVol)**(-1/3.) - fp = open(zobovDir+"/sample_info.txt", 'a') + # save this sample's information + with open(zobovDir+"/sample_info.dat", 'w') as output: + pickle.dump(sample, output, pickle.HIGHEST_PROTOCOL) + + fp = open(zobovDir+"/sample_info.txt", 'w') + fp.write("Sample name: %s\n" % sample.fullName) + fp.write("Sample nickname: %s\n" % sample.nickName) + fp.write("Data type: %s\n" % sample.dataType) + fp.write("Redshift range: %f - %f\n" %(sample.zBoundary[0],sample.zBoundary[1])) + if (sample.dataType == "simulation"): + fp.write("Particles placed on lightcone: %g\n" % sample.useLightCone) + fp.write("Peculiar velocities included: %g\n" % sample.usePecVel) + if (len(sample.subsample) == 1): + fp.write("Additional subsampling fraction: %s\n" % sample.subsample) + else: + fp.write("Additional subsampling fraction: %s\n" % sample.subsample[-1]) + fp.write("Simulation box length (Mpc/h): %g\n" % sample.boxLen) + fp.write("Simulation Omega_M: %g\n" % sample.omegaM) + fp.write("Number of simulation subvolumes: %s\n" % sample.numSubvolumes) + fp.write("My subvolume index: %s\n" % sample.mySubvolume) fp.write("Estimated volume (cubic Mpc/h): %g\n" % boxVol) fp.write("Number of real (non-boundary) tracers: %d\n" % numTracers) fp.write("Total number of tracers: %d\n" % numTotal) @@ -310,8 +329,9 @@ def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None, cmd = "./%s >> %s 2>&1" % (vozScript, logFile) os.system(cmd) +#cmd = "%s/../c_tools/zobov2/jozov2/jozov2 %s %s %s %s %s %g %s >> %s 2>&1" % \ - cmd = "%s/../c_tools/zobov2/jozov2/jozov2 %s %s %s %s %s %g %s >> %s 2>&1" % \ + cmd = "%s/jozov %s %s %s %s %s %g %s >> %s 2>&1" % \ (binPath, \ zobovDir+"/adj_"+sampleName+".dat", \ zobovDir+"/vol_"+sampleName+".dat", \