From 40d7793e5414e979e55712c903f62597e14a3dc3 Mon Sep 17 00:00:00 2001 From: "Paul M. Sutter" Date: Wed, 23 Apr 2025 15:25:26 -0400 Subject: [PATCH] central density calculation now uses correct normalization from survey volume --- c_source/pruning/pruneVoids.cpp | 15 ++++++--------- c_source/pruning/pruneVoids.ggo | 4 ++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/c_source/pruning/pruneVoids.cpp b/c_source/pruning/pruneVoids.cpp index df09552..a667a95 100644 --- a/c_source/pruning/pruneVoids.cpp +++ b/c_source/pruning/pruneVoids.cpp @@ -200,7 +200,7 @@ int main(int argc, char **argv) { char line[500], junkStr[10]; string outputDir, sampleName, dataPortion, prefix; double ranges[3][2], boxLen[3], mul; - double volNorm, radius; + double volNormZobov, volNormObs, radius; int clock1, clock2, clock3, clock4; double interval; int periodicX=0, periodicY=0, periodicZ=0; @@ -263,10 +263,8 @@ int main(int argc, char **argv) { part = (PART *) malloc(numPartTot * sizeof(PART)); temp = (float *) malloc(numPartTot * sizeof(float)); - // this is the volume normalization understood by zobov, - // which is all particles (including mock boundary galaxies used in old - // versions of VIDE) divided by the total volume of the bounding box - volNorm = numPartTot/(boxLen[0]*boxLen[1]*boxLen[2]); + volNormZobov = args.volNormZobov_arg; + volNormObs = args.volNormObs_arg; fread(&dummy, 1, 4, fp); fread(temp, numPartTot, 4, fp); @@ -326,7 +324,7 @@ int main(int argc, char **argv) { voids[i-1].densCon = densCon; voids[i-1].voidProb = voidProb; - voids[i-1].radius = pow(voidVol/volNorm*3./4./M_PI, 1./3.); + voids[i-1].radius = pow(voidVol/volNormZobov*3./4./M_PI, 1./3.); voids[i-1].accepted = 1; voids[i-1].isLeaf = true; @@ -692,7 +690,7 @@ int main(int argc, char **argv) { dist2 = pow(dist[0],2) + pow(dist[1],2) + pow(dist[2],2); if (sqrt(dist2) < centralRad) numCentral += 1; } - voids[iVoid].centralDen = numCentral / (volNorm*4./3. * M_PI * + voids[iVoid].centralDen = numCentral / (volNormObs*4./3. * M_PI * pow(centralRad, 3.)); clock4 = clock(); @@ -926,9 +924,8 @@ int main(int argc, char **argv) { printf(" Number kept: %d (out of %d)\n", (int) voids.size(), numVoids); printf(" We have %d edge voids\n", numEdge); printf(" We have %d central voids\n", numCentral); - printf(" We have %d too high central density\n", numHighDen); + printf(" We have %d high central density\n", numHighDen); printf(" We have %d that are not leaf nodes\n", numAreParents); - outputDir = string(args.outputDir_arg); sampleName = (string(args.sampleName_arg)+".out"); diff --git a/c_source/pruning/pruneVoids.ggo b/c_source/pruning/pruneVoids.ggo index 69b84aa..9badbb5 100644 --- a/c_source/pruning/pruneVoids.ggo +++ b/c_source/pruning/pruneVoids.ggo @@ -28,6 +28,10 @@ option "useComoving" - "Void positions are in comoving coordinates" flag off option "omegaM" - "Omega_M for redshift convertion" double optional default="0.27" +option "volNormZobov" - "Volume normalization as understood by zobox" double optional default="1.0" + +option "volNormObs" - "Volume normalization within the survey volume" double optional default="1.0" + option "rMin" - "Minimum allowable void radius" double optional default="0.0" option "outputDir" - "Directory to place outputs" string required