fixed accidental deletion of redshift calculation

This commit is contained in:
Paul M. Sutter 2025-04-22 23:00:52 -04:00
parent ccc2d67cf1
commit 83d0d66d90

View file

@ -736,8 +736,14 @@ int main(int argc, char **argv) {
sqrt(pow(voids[iVoid].macrocenter[0] - boxLen[0]/2.,2) +
pow(voids[iVoid].macrocenter[1] - boxLen[1]/2.,2) +
pow(voids[iVoid].macrocenter[2] - boxLen[2]/2.,2));
//voids[iVoid].redshiftInMpc = voids[iVoid].redshiftInMpc;
if (args.useComoving_flag) {
redshift = gsl_interp_eval(interp, dL, redshifts,
voids[iVoid].redshiftInMpc, acc);
voids[iVoid].redshift = redshift;
} else {
redshift = voids[iVoid].redshiftInMpc;
voids[iVoid].redshift = voids[iVoid].redshiftInMpc/LIGHT_SPEED*100.;
}
} else {
voids[iVoid].redshiftInMpc = voids[iVoid].macrocenter[2];
@ -878,7 +884,7 @@ int main(int argc, char **argv) {
voids.resize(iGood);
printf(" 2nd filter: rejected %d too small\n", numTooSmall);
// find top-level voids
// mark top-level voids
numAreParents = 0;
iGood = 0;
for (iVoid = 0; iVoid < voids.size(); iVoid++) {