From c578ddf1f9f82c859f0d1ddca455452f95093539 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 18 Dec 2012 12:14:25 -0600 Subject: [PATCH] optional periodic in prunevoid barycenters, updated multidark script --- c_tools/stacking/pruneVoids.cpp | 12 ++++++++++-- pipeline/datasets/multidark.py | 16 ++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/c_tools/stacking/pruneVoids.cpp b/c_tools/stacking/pruneVoids.cpp index f418c5d..cd88462 100644 --- a/c_tools/stacking/pruneVoids.cpp +++ b/c_tools/stacking/pruneVoids.cpp @@ -331,6 +331,13 @@ int main(int argc, char **argv) { voids[iVoid].barycenter[1] += voids[iVoid].center[1]; voids[iVoid].barycenter[2] += voids[iVoid].center[2]; + if (periodicX) + voids[iVoid].barycenter[0] = fmod(voids[iVoid].barycenter[0], boxLen[0]); + if (periodicY) + voids[iVoid].barycenter[1] = fmod(voids[iVoid].barycenter[1], boxLen[1]); + if (periodicZ) + voids[iVoid].barycenter[2] = fmod(voids[iVoid].barycenter[2], boxLen[2]); + // compute central density centralRad = voids[iVoid].radius/args_info.centralRadFrac_arg; centralRad *= centralRad; @@ -476,13 +483,14 @@ int main(int argc, char **argv) { voids[iVoid].accepted = -2; } - // *alwas* clean out near edges since there are no mocks there + // *always* clean out near edges since there are no mocks there if (tolerance*voids[iVoid].maxRadius > voids[iVoid].nearestEdge) { voids[iVoid].accepted = -3; } // assume the lower z-boundary is "soft" in observations - if (voids[iVoid].redshift < args_info.zMin_arg) { + if (args_info.isObservation_flag && + voids[iVoid].redshift < args_info.zMin_arg) { voids[iVoid].accepted = -3; } } diff --git a/pipeline/datasets/multidark.py b/pipeline/datasets/multidark.py index 1244626..dc5b4e9 100644 --- a/pipeline/datasets/multidark.py +++ b/pipeline/datasets/multidark.py @@ -33,13 +33,16 @@ particleFileBase = "mdr1_particles_z" # list of file numbers for the particle files # to get particle file name, we take particleFileBase+fileNum -fileNums = (("0.0", "0.53", "1.0")) +#fileNums = ["0.53"] +fileNums = ["0.0", "0.53", "1.0"] # redshift of each file in the above list -redshifts = (("0.0", "0.53", "1.0")) +#redshifts = ["0.53"] +redshifts = ["0.0", "0.53", "1.0"] # how many independent slices along the z-axis? -numSlices = 4 +numSlices = 1 +#numSlices = 4 # how many subdivisions along the x- and y- axis? # ( = 2 will make 4 subvolumes for each slice, = 3 will make 9, etc.) @@ -57,7 +60,8 @@ haloFileBase = "mdr1_halos_z" # minimum halo mass cuts to apply for the halo catalog # use "none" to get all halos -minHaloMasses = ["none", 1.2e13] +minHaloMasses = [1.2e13] +#minHaloMasses = ["none", 1.2e13] # locations of data in the halo catalog haloFileMCol = 6 @@ -73,8 +77,8 @@ haloFileNumComLines = 0 # adjust these two parameters given the memory contraints on your system: # numZobovDivisions: how many sub-volumes per dimension will zobov process # numZobovThreads: how many sub-volumes to process at once? -numZobovDivisions = 2 -numZobovThreads = 2 +numZobovDivisions = 4 +numZobovThreads = 4 # simulation information numPart = 1024*1024*1024