mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Merge branch 'master' of ssh://bitbucket.org/cosmicvoids/void_identification
This commit is contained in:
commit
361ab5b617
10 changed files with 192 additions and 123 deletions
|
@ -88,6 +88,8 @@ int main(int argc, char **argv) {
|
|||
int closestMatchID;
|
||||
float closestMatchDist;
|
||||
float commonVolRatio;
|
||||
MATCHPROPS newMatch;
|
||||
int MAX_MATCHES = 20;
|
||||
|
||||
CATALOG catalog1, catalog2;
|
||||
|
||||
|
@ -134,38 +136,44 @@ int main(int argc, char **argv) {
|
|||
printf("Will assume z-direction is periodic.\n");
|
||||
}
|
||||
|
||||
printf(" Determining overlap...\n");
|
||||
|
||||
/*
|
||||
// just use centers
|
||||
// find closest voids
|
||||
printf(" Finding nearest matches...\n");
|
||||
for (iVoid1 = 0; iVoid1 < catalog1.numVoids; iVoid1++) {
|
||||
closestMatchDist = 1.e99;
|
||||
for (iVoid2 = 0; iVoid2 < catalog2.numVoids; iVoid2++) {
|
||||
rdist = getDist(catalog1, catalog2, iVoid1, iVoid2,
|
||||
periodicX, periodicY, periodicZ);
|
||||
|
||||
if (rdist < closestMatchDist) {
|
||||
closestMatchID = iVoid2;
|
||||
closestMatchDist = rdist;
|
||||
|
||||
newMatch.matchID = iVoid2;
|
||||
newMatch.commonVol = 0;
|
||||
newMatch.dist = rdist;
|
||||
|
||||
if (catalog1.voids[iVoid1].matches.size() < MAX_MATCHES) {
|
||||
catalog1.voids[iVoid1].matches.push_back(newMatch);
|
||||
} else {
|
||||
// find the farthest match
|
||||
float farthestMatchDist = 0;
|
||||
int farthestMatchID = 0;
|
||||
for (iMatch = 0; iMatch < MAX_MATCHES; iMatch++) {
|
||||
if (catalog1.voids[iVoid1].matches[iMatch].dist > farthestMatchDist){
|
||||
farthestMatchDist = catalog1.voids[iVoid1].matches[iMatch].dist;
|
||||
farthestMatchID = iMatch;
|
||||
}
|
||||
}
|
||||
if (rdist < farthestMatchDist)
|
||||
catalog1.voids[iVoid1].matches[farthestMatchID] = newMatch;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MATCHPROPS newMatch;
|
||||
newMatch.matchID = closestMatchID;
|
||||
newMatch.commonVol = 1;
|
||||
newMatch.dist = closestMatchDist;
|
||||
catalog1.voids[iVoid1].matches.push_back(newMatch);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
printf(" Determining overlap...\n");
|
||||
for (iVoid1 = 0; iVoid1 < catalog1.numVoids; iVoid1++) {
|
||||
printf(" Working on void %d of %d...\n", iVoid1, catalog1.numVoids);
|
||||
printf(" Working on void %d of %d...\n", iVoid1+1, catalog1.numVoids);
|
||||
voidID1 = catalog1.voids[iVoid1].voidID;
|
||||
|
||||
for (iVoid2 = 0; iVoid2 < catalog2.numVoids; iVoid2++) {
|
||||
for (iMatch = 0; iMatch < catalog1.voids[iVoid1].matches.size();iMatch++) {
|
||||
iVoid2 = catalog1.voids[iVoid1].matches[iMatch].matchID;
|
||||
voidID2 = catalog2.voids[iVoid2].voidID;
|
||||
match = false;
|
||||
|
||||
for (iZ1 = 0; iZ1 < catalog1.void2Zones[voidID1].numZones; iZ1++) {
|
||||
zoneID1 = catalog1.void2Zones[voidID1].zoneIDs[iZ1];
|
||||
|
@ -180,6 +188,7 @@ int main(int argc, char **argv) {
|
|||
partID2 = catalog2.zones2Parts[zoneID2].partIDs[p2];
|
||||
|
||||
match = false;
|
||||
|
||||
if (args.useID_flag) {
|
||||
if (catalog1.part[partID1].uniqueID ==
|
||||
catalog2.part[partID2].uniqueID) match = true;
|
||||
|
@ -203,35 +212,12 @@ int main(int argc, char **argv) {
|
|||
r2 = pow(3./4./M_PI*catalog2.part[partID2].volume /
|
||||
catalog2.numPartTot, 1./3.);
|
||||
if (rdist <= 0.1*r1 || rdist <= 0.1*r2) match = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (match) {
|
||||
bool alreadyMatched = false;
|
||||
for (iMatch = 0;
|
||||
iMatch < catalog1.voids[iVoid1].matches.size(); iMatch++) {
|
||||
if (catalog1.voids[iVoid1].matches[iMatch].matchID ==
|
||||
iVoid2) {
|
||||
alreadyMatched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (alreadyMatched) {
|
||||
//catalog1.voids[iVoid1].matches[iMatch].commonVol += 1;
|
||||
catalog1.voids[iVoid1].matches[iMatch].commonVol +=
|
||||
catalog1.part[partID1].volume;
|
||||
} else {
|
||||
MATCHPROPS newMatch;
|
||||
newMatch.matchID = iVoid2;
|
||||
//newMatch.commonVol = 1;
|
||||
newMatch.commonVol = catalog1.part[partID1].volume;
|
||||
|
||||
newMatch.dist = getDist(catalog1, catalog2, iVoid1, iVoid2,
|
||||
periodicX, periodicY, periodicZ);
|
||||
catalog1.voids[iVoid1].matches.push_back(newMatch);
|
||||
} // end if match
|
||||
}
|
||||
catalog1.voids[iVoid1].matches[iMatch].commonVol +=
|
||||
catalog2.part[partID2].volume;
|
||||
} // end if match
|
||||
|
||||
} // end p2
|
||||
} // end iZ2
|
||||
|
@ -240,11 +226,13 @@ int main(int argc, char **argv) {
|
|||
} // end iVoid2
|
||||
} // end match finding
|
||||
|
||||
printf(" Sorting matches...\n");
|
||||
for (iVoid1 = 0; iVoid1 < catalog1.numVoids; iVoid1++) {
|
||||
sortMatches(catalog1.voids[iVoid1].matches);
|
||||
}
|
||||
|
||||
// count up significant matches
|
||||
printf(" Categorizing matches...\n");
|
||||
for (iVoid1 = 0; iVoid1 < catalog1.numVoids; iVoid1++) {
|
||||
closestMatchDist = 0.;
|
||||
for (iMatch = 0; iMatch < catalog1.voids[iVoid1].matches.size(); iMatch++) {
|
||||
|
@ -257,12 +245,12 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
// output summary
|
||||
printf(" Output...\n");
|
||||
std::string filename;
|
||||
filename = string(args.outfile_arg);
|
||||
filename = filename.append("_summary.out");
|
||||
filename = filename.append("summary.out");
|
||||
fp = fopen(filename.c_str(), "w");
|
||||
//fp = fopen(args.outfile_arg, "w");
|
||||
fprintf(fp, "# void ID, radius, radius ratio, common volume ratio, relative dist, num matches, num significant matches\n");
|
||||
fprintf(fp, "# void ID, radius, radius ratio, common volume ratio, common volume ratio 2, relative dist, num matches, num significant matches\n");
|
||||
for (iVoid1 = 0; iVoid1 < catalog1.numVoids; iVoid1++) {
|
||||
int voidID = catalog1.voids[iVoid1].voidID;
|
||||
if (catalog1.voids[iVoid1].numMatches > 0) {
|
||||
|
@ -272,27 +260,31 @@ int main(int argc, char **argv) {
|
|||
commonVolRatio = catalog1.voids[iVoid1].matches[0].commonVol /
|
||||
//catalog1.voids[iVoid1].numPart;
|
||||
catalog1.voids[iVoid1].vol;
|
||||
float volRatio = catalog1.voids[iVoid1].matches[0].commonVol /
|
||||
catalog2.voids[iVoid2].vol;
|
||||
rdist = catalog1.voids[iVoid1].matches[0].dist;
|
||||
rdist /= catalog1.voids[iVoid1].radius;
|
||||
|
||||
fprintf(fp, "%d %.2f %.2f %.2f %.2f %d %d\n", voidID,
|
||||
fprintf(fp, "%d %.2f %.2f %.2f %.2f %.2f %d %d\n", voidID,
|
||||
catalog1.voids[iVoid1].radiusMpc,
|
||||
rRatio,
|
||||
commonVolRatio,
|
||||
volRatio,
|
||||
rdist,
|
||||
catalog1.voids[iVoid1].numMatches,
|
||||
catalog1.voids[iVoid1].numBigMatches);
|
||||
|
||||
} else {
|
||||
fprintf(fp, "%d %f 0.0 0.0 0.0 0 0\n", voidID,
|
||||
catalog1.voids[iVoid1].radius);
|
||||
fprintf(fp, "%d %.2f 0.0 0.0 0.0 0.0 0 0\n", voidID,
|
||||
catalog1.voids[iVoid1].radiusMpc);
|
||||
}
|
||||
} // end printing
|
||||
fclose(fp);
|
||||
|
||||
// output detail
|
||||
printf(" Output detail...\n");
|
||||
filename = string(args.outfile_arg);
|
||||
filename = filename.append("_detail.out");
|
||||
filename = filename.append("detail.out");
|
||||
fp = fopen(filename.c_str(), "w");
|
||||
int MAX_OUT = 10;
|
||||
fprintf(fp, "# void ID, match common vol\n");
|
||||
|
@ -300,14 +292,13 @@ int main(int argc, char **argv) {
|
|||
int voidID = catalog1.voids[iVoid1].voidID;
|
||||
fprintf(fp,"%d: ", voidID);
|
||||
for (iMatch = 0; iMatch < MAX_OUT; iMatch++) {
|
||||
|
||||
if (iMatch < catalog1.voids[iVoid].matches.size()) {
|
||||
if (iMatch < catalog1.voids[iVoid1].matches.size()) {
|
||||
commonVolRatio = catalog1.voids[iVoid1].matches[iMatch].commonVol /
|
||||
//catalog1.voids[iVoid1].numPart;
|
||||
catalog1.voids[iVoid1].vol;
|
||||
|
||||
fprintf(fp, "%.2f ", commonVolRatio);
|
||||
|
||||
fprintf(fp, "%.3f ", catalog1.voids[iVoid1].matches[iMatch].dist);
|
||||
//fprintf(fp, "%.2f ", commonVolRatio);
|
||||
} else {
|
||||
fprintf(fp, "0.00 ");
|
||||
}
|
||||
|
@ -443,10 +434,6 @@ void loadCatalog(const char *partFile, const char *volFile,
|
|||
catalog.voids[i].voidProb = voidProb;
|
||||
|
||||
catalog.voids[i].radius = pow(voidVol/catalog.numPartTot*3./4./M_PI, 1./3.);
|
||||
//catalog.voids[i].biggestMatchID = -1;
|
||||
//catalog.voids[i].biggestMatchVol = 0;
|
||||
//catalog.voids[i].closestMatchID = -1;
|
||||
//catalog.voids[i].closestMatchDist = 1.e99;
|
||||
catalog.voids[i].numMatches = 0;
|
||||
catalog.voids[i].numBigMatches = 0;
|
||||
|
||||
|
@ -548,14 +535,15 @@ void sortMatches(std::vector<MATCHPROPS>& matches) {
|
|||
MATCHPROPS tempMatch;
|
||||
bool swapped;
|
||||
|
||||
if (matches.size() == 1) return;
|
||||
if (matches.size() <= 1) return;
|
||||
|
||||
swapped = false;
|
||||
while (!swapped) {
|
||||
swapped = true;
|
||||
while (swapped) {
|
||||
swapped = false;
|
||||
for (int iMatch = 0; iMatch < matches.size() - 1; iMatch++) {
|
||||
if (matches[iMatch].commonVol > matches[iMatch+1].commonVol) {
|
||||
tempMatch = matches[iMatch];
|
||||
if (matches[iMatch].dist > matches[iMatch+1].dist) {
|
||||
//if (matches[iMatch].commonVol < matches[iMatch+1].commonVol) {
|
||||
tempMatch = matches[iMatch+1];
|
||||
matches[iMatch+1] = matches[iMatch];
|
||||
matches[iMatch] = tempMatch;
|
||||
swapped = true;
|
||||
|
|
|
@ -10,6 +10,7 @@ bool loadParticleInfo(ParticleInfo& info,
|
|||
const std::string& extra_info)
|
||||
{
|
||||
int numpart;
|
||||
int isObservation;
|
||||
|
||||
NcFile f_info(extra_info.c_str());
|
||||
|
||||
|
@ -23,6 +24,7 @@ bool loadParticleInfo(ParticleInfo& info,
|
|||
info.ranges[2][0] = f_info.get_att("range_z_min")->as_double(0);
|
||||
info.ranges[2][1] = f_info.get_att("range_z_max")->as_double(0);
|
||||
info.mask_index = f_info.get_att("mask_index")->as_int(0); //PMS
|
||||
isObservation = f_info.get_att("is_observation")->as_int(0); //PMS
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
info.length[i] = info.ranges[i][1] - info.ranges[i][0];
|
||||
|
@ -59,6 +61,14 @@ bool loadParticleInfo(ParticleInfo& info,
|
|||
for (int i = 0; i < numpart; i++)
|
||||
info.particles[i].z = mul*f.readReal32();
|
||||
f.endCheckpoint();
|
||||
|
||||
if (!isObservation) {
|
||||
for (int i = 0; i < numpart; i++) {
|
||||
info.particles[i].x += info.ranges[0][0];
|
||||
info.particles[i].y += info.ranges[1][0];
|
||||
info.particles[i].z += info.ranges[2][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (const NoSuchFileException& e)
|
||||
{
|
||||
|
|
|
@ -466,6 +466,7 @@ void saveForZobov(ParticleData& pdata, const string& fname, const string& paramn
|
|||
fp.add_att("range_z_min", -Lmax/100.);
|
||||
fp.add_att("range_z_max", Lmax/100.);
|
||||
fp.add_att("mask_index", pdata.mask_index); // PMS
|
||||
fp.add_att("is_observation", 1); // PMS
|
||||
|
||||
int nOutputPart = pdata.mask_index;
|
||||
//int nOutputPart = pdata.pos.size();
|
||||
|
|
|
@ -221,7 +221,12 @@ void generateOutput(SimuData *data, int axis,
|
|||
// cleared. That way new particles can be appended if this is a multi-file snapshot.
|
||||
void selectBox(SimuData *simu, std::vector<long>& targets, generateMock_info& args_info)
|
||||
{
|
||||
float subsample = args_info.subsample_given ? args_info.subsample_arg : 1.0;
|
||||
float subsample;
|
||||
if (args_info.subsample_given) {
|
||||
subsample = args_info.subsample_arg;
|
||||
} else {
|
||||
subsample = 1.0;
|
||||
}
|
||||
double ranges[3][2] = {
|
||||
{ args_info.rangeX_min_arg, args_info.rangeX_max_arg },
|
||||
{ args_info.rangeY_min_arg, args_info.rangeY_max_arg },
|
||||
|
@ -338,6 +343,7 @@ void saveBox(SimuData *&boxed, const std::string& outbox)
|
|||
f.add_att("range_z_min", ranges[4]);
|
||||
f.add_att("range_z_max", ranges[5]);
|
||||
f.add_att("mask_index", -1);
|
||||
f.add_att("is_observation", 0);
|
||||
|
||||
NcDim *NumPart_dim = f.add_dim("numpart_dim", boxed->NumPart);
|
||||
NcDim *NumSnap_dim = f.add_dim("numsnap_dim", num_snapshots);
|
||||
|
|
|
@ -103,6 +103,9 @@ int main(int argc, char **argv) {
|
|||
args_info.periodic_arg);
|
||||
|
||||
// check for periodic box
|
||||
periodicX = 0;
|
||||
periodicY = 0;
|
||||
periodicZ = 0;
|
||||
if (!args_info.isObservation_flag) {
|
||||
if ( strchr(args_info.periodic_arg, 'x') != NULL) {
|
||||
periodicX = 1;
|
||||
|
@ -143,9 +146,9 @@ int main(int argc, char **argv) {
|
|||
temp = (float *) malloc(numPartTot * sizeof(float));
|
||||
|
||||
volNorm = numPartTot/(boxLen[0]*boxLen[1]*boxLen[2]);
|
||||
printf("VOL NORM = %f\n", volNorm);
|
||||
printf(" VOL NORM = %f\n", volNorm);
|
||||
|
||||
printf("CENTRAL DEN = %f\n", args_info.maxCentralDen_arg);
|
||||
printf(" CENTRAL DEN = %f\n", args_info.maxCentralDen_arg);
|
||||
|
||||
fread(&dummy, 1, 4, fp);
|
||||
fread(temp, numPartTot, 4, fp);
|
||||
|
@ -311,13 +314,16 @@ int main(int argc, char **argv) {
|
|||
voids[iVoid].barycenter[2] = 0.;
|
||||
|
||||
for (p = 0; p < voids[iVoid].numPart; p++) {
|
||||
dist[0] = fabs(voidPart[p].x - voids[iVoid].center[0]);
|
||||
dist[1] = fabs(voidPart[p].y - voids[iVoid].center[1]);
|
||||
dist[2] = fabs(voidPart[p].z - voids[iVoid].center[2]);
|
||||
dist[0] = voidPart[p].x - voids[iVoid].center[0];
|
||||
dist[1] = voidPart[p].y - voids[iVoid].center[1];
|
||||
dist[2] = voidPart[p].z - voids[iVoid].center[2];
|
||||
|
||||
if (periodicX) dist[0] = fmin(dist[0], boxLen[0]-dist[0]);
|
||||
if (periodicY) dist[1] = fmin(dist[1], boxLen[1]-dist[1]);
|
||||
if (periodicZ) dist[2] = fmin(dist[2], boxLen[2]-dist[2]);
|
||||
if (periodicX && fabs(dist[0]) > boxLen[0]/2.)
|
||||
dist[0] = dist[0] - copysign(boxLen[0], dist[0]);
|
||||
if (periodicY && fabs(dist[1]) > boxLen[1]/2.)
|
||||
dist[1] = dist[1] - copysign(boxLen[1], dist[1]);
|
||||
if (periodicZ && fabs(dist[2]) > boxLen[2]/2.)
|
||||
dist[2] = dist[2] - copysign(boxLen[2], dist[2]);
|
||||
|
||||
voids[iVoid].barycenter[0] += voidPart[p].vol*(dist[0]);
|
||||
voids[iVoid].barycenter[1] += voidPart[p].vol*(dist[1]);
|
||||
|
@ -331,12 +337,25 @@ 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]);
|
||||
if (periodicX) {
|
||||
if (voids[iVoid].barycenter[0] > boxLen[0])
|
||||
voids[iVoid].barycenter[0] = voids[iVoid].barycenter[0] - boxLen[0];
|
||||
if (voids[iVoid].barycenter[0] < 0)
|
||||
voids[iVoid].barycenter[0] = boxLen[0] - voids[iVoid].barycenter[0];
|
||||
}
|
||||
if (periodicY) {
|
||||
if (voids[iVoid].barycenter[1] > boxLen[1])
|
||||
voids[iVoid].barycenter[1] = voids[iVoid].barycenter[1] - boxLen[1];
|
||||
if (voids[iVoid].barycenter[1] < 1)
|
||||
voids[iVoid].barycenter[1] = boxLen[1] - voids[iVoid].barycenter[1];
|
||||
}
|
||||
if (periodicZ) {
|
||||
if (voids[iVoid].barycenter[2] > boxLen[2])
|
||||
voids[iVoid].barycenter[2] = voids[iVoid].barycenter[2] - boxLen[2];
|
||||
if (voids[iVoid].barycenter[2] < 2)
|
||||
voids[iVoid].barycenter[2] = boxLen[2] - voids[iVoid].barycenter[2];
|
||||
}
|
||||
|
||||
|
||||
// compute central density
|
||||
centralRad = voids[iVoid].radius/args_info.centralRadFrac_arg;
|
||||
|
@ -450,6 +469,11 @@ int main(int argc, char **argv) {
|
|||
voids[iVoid].nearestEdge = nearestEdge;
|
||||
} // iVoid
|
||||
|
||||
int numWrong = 0;
|
||||
int numHighDen = 0;
|
||||
int numEdge = 0;
|
||||
int numTooSmall = 0;
|
||||
|
||||
printf(" Picking winners and losers...\n");
|
||||
for (iVoid = 0; iVoid < numVoids; iVoid++) {
|
||||
voids[iVoid].accepted = 1;
|
||||
|
@ -462,36 +486,43 @@ int main(int argc, char **argv) {
|
|||
|
||||
if (voids[iVoid].centralDen > args_info.maxCentralDen_arg) {
|
||||
voids[iVoid].accepted = -1;
|
||||
numHighDen++;
|
||||
}
|
||||
|
||||
// toss out voids that are obviously wrong
|
||||
if (voids[iVoid].densCon > 1.e3) {
|
||||
if (voids[iVoid].densCon > 1.e4) {
|
||||
voids[iVoid].accepted = -4;
|
||||
numWrong++;
|
||||
}
|
||||
|
||||
if (strcmp(args_info.dataPortion_arg, "edge") == 0 &&
|
||||
tolerance*voids[iVoid].maxRadius < voids[iVoid].nearestMock) {
|
||||
voids[iVoid].accepted = -3;
|
||||
numEdge++;
|
||||
}
|
||||
|
||||
if (strcmp(args_info.dataPortion_arg, "central") == 0 &&
|
||||
tolerance*voids[iVoid].maxRadius > voids[iVoid].nearestMock) {
|
||||
voids[iVoid].accepted = -3;
|
||||
numEdge++;
|
||||
}
|
||||
|
||||
if (voids[iVoid].radius < args_info.rMin_arg) {
|
||||
voids[iVoid].accepted = -2;
|
||||
numTooSmall++;
|
||||
}
|
||||
|
||||
// *always* clean out near edges since there are no mocks there
|
||||
if (tolerance*voids[iVoid].maxRadius > voids[iVoid].nearestEdge) {
|
||||
voids[iVoid].accepted = -3;
|
||||
numEdge++;
|
||||
}
|
||||
|
||||
// assume the lower z-boundary is "soft" in observations
|
||||
if (args_info.isObservation_flag &&
|
||||
voids[iVoid].redshift < args_info.zMin_arg) {
|
||||
voids[iVoid].accepted = -3;
|
||||
numEdge++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -501,6 +532,10 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
printf(" Number kept: %d (out of %d)\n", numKept, numVoids);
|
||||
printf(" Rejected %d near the edge\n", numEdge);
|
||||
printf(" Rejected %d too small\n", numTooSmall);
|
||||
printf(" Rejected %d obviously bad\n", numWrong);
|
||||
printf(" Rejected %d too high central density\n", numHighDen);
|
||||
|
||||
printf(" Output...\n");
|
||||
fp = fopen(args_info.output_arg, "w");
|
||||
|
@ -531,6 +566,10 @@ int main(int argc, char **argv) {
|
|||
|
||||
fprintf(fpBarycenter, "%d %e %e %e\n",
|
||||
voids[iVoid].voidID,
|
||||
// TEST
|
||||
//voids[iVoid].center[0],
|
||||
//voids[iVoid].center[1],
|
||||
//voids[iVoid].center[2]);
|
||||
voids[iVoid].barycenter[0],
|
||||
voids[iVoid].barycenter[1],
|
||||
voids[iVoid].barycenter[2]);
|
||||
|
@ -540,11 +579,19 @@ int main(int argc, char **argv) {
|
|||
voids[iVoid].nearestMock);
|
||||
|
||||
double outCenter[3];
|
||||
// TEST
|
||||
//outCenter[0] = voids[iVoid].center[0];
|
||||
//outCenter[1] = voids[iVoid].center[1];
|
||||
//outCenter[2] = voids[iVoid].center[2];
|
||||
outCenter[0] = voids[iVoid].barycenter[0];
|
||||
outCenter[1] = voids[iVoid].barycenter[1];
|
||||
outCenter[2] = voids[iVoid].barycenter[2];
|
||||
|
||||
if (args_info.isObservation_flag) {
|
||||
// TEST
|
||||
//outCenter[0] = (voids[iVoid].center[0]-boxLen[0]/2.)*100.;
|
||||
//outCenter[1] = (voids[iVoid].center[1]-boxLen[1]/2.)*100.;
|
||||
//outCenter[2] = (voids[iVoid].center[2]-boxLen[2]/2.)*100.;
|
||||
outCenter[0] = (voids[iVoid].barycenter[0]-boxLen[0]/2.)*100.;
|
||||
outCenter[1] = (voids[iVoid].barycenter[1]-boxLen[1]/2.)*100.;
|
||||
outCenter[2] = (voids[iVoid].barycenter[2]-boxLen[2]/2.)*100.;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue