mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Merge branch 'master' of bitbucket.org:cosmicvoids/void_identification
This commit is contained in:
commit
958d7a0911
40 changed files with 245 additions and 108 deletions
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./crossCompare/analysis/datasetsToAnalyze.py
|
||||
# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/datasetsToAnalyze.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./crossCompare/analysis/mergerTree.py
|
||||
# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/mergerTree.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./build_tools/gather_sources.py
|
||||
# VIDE -- Void IDentification and Examination -- ./build_tools/gather_sources.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -40,7 +40,7 @@ def apply_license(license, relimit, filename):
|
|||
|
||||
def apply_python_license(filename):
|
||||
license="""#+
|
||||
# VIDE -- Void IDEntification pipeline -- @FILENAME@
|
||||
# VIDE -- Void IDentification and Examination -- @FILENAME@
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -67,7 +67,7 @@ def apply_python_license(filename):
|
|||
|
||||
def apply_cpp_license(filename):
|
||||
license="""/*+
|
||||
VIDE -- Void IDEntification pipeline -- @FILENAME@
|
||||
VIDE -- Void IDentification and Examination -- @FILENAME@
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/analysis/voidOverlap.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/analysis/voidOverlap.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
@ -73,6 +73,7 @@ typedef struct voidStruct {
|
|||
float nearestEdge;
|
||||
float barycenter[3];
|
||||
float ellipticity;
|
||||
float eigv1[3], eigv2[3], eigv3[3], eig[3];
|
||||
std::vector<MATCHPROPS> matches;
|
||||
int numMatches;
|
||||
int numBigMatches;
|
||||
|
@ -375,6 +376,87 @@ int main(int argc, char **argv) {
|
|||
catalog1.voids[iVoid1].radius;
|
||||
float ellipRatio = catalog2.voids[iVoid2].ellipticity /
|
||||
catalog1.voids[iVoid1].ellipticity;
|
||||
|
||||
// find angles between major axes, etc.
|
||||
int iMaj1, iMed1, iMin1;
|
||||
int iMaj2, iMed2, iMin2;
|
||||
float eig1[3], eig2[3];
|
||||
float eigv1[6], eigv2[6];
|
||||
float cosThetaMaj, cosThetaMed, cosThetaMin;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
eig1[i] = catalog1.voids[iVoid1].eig[i];
|
||||
eigv1[0,i] = catalog1.voids[iVoid1].eigv1[i];
|
||||
eigv1[1,i] = catalog1.voids[iVoid1].eigv2[i];
|
||||
eigv1[2,i] = catalog1.voids[iVoid1].eigv3[i];
|
||||
eig2[i] = catalog2.voids[iVoid2].eig[i];
|
||||
eigv2[0,i] = catalog2.voids[iVoid2].eigv1[i];
|
||||
eigv2[1,i] = catalog2.voids[iVoid2].eigv2[i];
|
||||
eigv2[2,i] = catalog2.voids[iVoid2].eigv3[i];
|
||||
}
|
||||
|
||||
if (eig1[0] > eig1[1] && eig1[0] > eig1[2]) iMaj1 = 0;
|
||||
if (eig1[1] > eig1[2] && eig1[1] > eig1[0]) iMaj1 = 1;
|
||||
if (eig1[2] > eig1[1] && eig1[2] > eig1[0]) iMaj1 = 2;
|
||||
if (eig1[0] > eig1[1] && eig1[0] < eig1[2]) iMed1 = 0;
|
||||
if (eig1[1] > eig1[2] && eig1[1] < eig1[0]) iMed1 = 1;
|
||||
if (eig1[2] > eig1[1] && eig1[2] < eig1[0]) iMed1 = 2;
|
||||
if (eig1[0] < eig1[1] && eig1[0] < eig1[2]) iMin1 = 0;
|
||||
if (eig1[1] < eig1[2] && eig1[1] < eig1[0]) iMin1 = 1;
|
||||
if (eig1[2] < eig1[1] && eig1[2] < eig1[0]) iMin1 = 2;
|
||||
|
||||
if (eig2[0] > eig2[1] && eig2[0] > eig2[2]) iMaj2 = 0;
|
||||
if (eig2[1] > eig2[2] && eig2[1] > eig2[0]) iMaj2 = 1;
|
||||
if (eig2[2] > eig2[1] && eig2[2] > eig2[0]) iMaj2 = 2;
|
||||
if (eig2[0] > eig2[1] && eig2[0] < eig2[2]) iMed2 = 0;
|
||||
if (eig2[1] > eig2[2] && eig2[1] < eig2[0]) iMed2 = 1;
|
||||
if (eig2[2] > eig2[1] && eig2[2] < eig2[0]) iMed2 = 2;
|
||||
if (eig2[0] < eig2[1] && eig2[0] < eig2[2]) iMin2 = 0;
|
||||
if (eig2[1] < eig2[2] && eig2[1] < eig2[0]) iMin2 = 1;
|
||||
if (eig2[2] < eig2[1] && eig2[2] < eig2[0]) iMin2 = 2;
|
||||
|
||||
//printf("EIG CHECK %d %d %e %e %e %d %e %e %e %d\n", iVoid1, iVoid2, eig1[0], eig1[1], eig1[2], iMin1, eig2[0], eig2[1], eig2[2], iMin2);
|
||||
cosThetaMaj = (eigv1[iMaj1,0]*eigv2[iMaj2,0] +
|
||||
eigv1[iMaj1,1]*eigv2[iMaj2,1] +
|
||||
eigv1[iMaj1,2]*eigv2[iMaj2,2]);
|
||||
//printf("EIG CHECK %d %d %e %e %e %e %e %e %e\n", iVoid1, iVoid2, eigv1[iMaj1,0], eigv1[iMaj1,1], eigv1[iMaj1,2], eigv2[iMaj2,0], eigv2[iMaj2,1], eigv2[iMaj2,2], cosThetaMaj);
|
||||
|
||||
|
||||
if (fabs(cosThetaMaj) > 0.) cosThetaMaj = acos(fabs(cosThetaMaj));
|
||||
|
||||
float majAxisRatio = eig2[iMaj2]/eig1[iMaj1];
|
||||
float minAxisRatio = eig2[iMin2]/eig1[iMin1];
|
||||
|
||||
// TEST
|
||||
/*
|
||||
if (catalog1.voids[iVoid1].voidID == 267 &&
|
||||
catalog2.voids[iVoid2].voidID == 346) {
|
||||
|
||||
int voidID1 = catalog1.voids[iVoid1].voidID;
|
||||
for (iZ1 = 0; iZ1 < catalog1.void2Zones[voidID1].numZones; iZ1++) {
|
||||
zoneID1 = catalog1.void2Zones[voidID1].zoneIDs[iZ1];
|
||||
for (p1 = 0; p1 < catalog1.zones2Parts[zoneID1].numPart; p1++) {
|
||||
partID1 = catalog1.zones2Parts[zoneID1].partIDs[p1];
|
||||
printf("VOID1 %e %e %e\n", catalog1.part[partID1].x,
|
||||
catalog1.part[partID1].y,
|
||||
catalog1.part[partID1].z);
|
||||
}
|
||||
}
|
||||
|
||||
int voidID2 = catalog2.voids[iVoid2].voidID;
|
||||
for (iZ2 = 0; iZ2 < catalog2.void2Zones[voidID2].numZones; iZ2++) {
|
||||
zoneID2 = catalog2.void2Zones[voidID2].zoneIDs[iZ2];
|
||||
for (p2 = 0; p2 < catalog2.zones2Parts[zoneID2].numPart; p2++) {
|
||||
partID2 = catalog2.zones2Parts[zoneID2].partIDs[p2];
|
||||
printf("VOID1 %e %e %e\n", catalog2.part[partID2].x,
|
||||
catalog2.part[partID2].y,
|
||||
catalog2.part[partID2].z);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
// END TEST
|
||||
commonVolRatio = catalog1.voids[iVoid1].matches[0].commonVolOrig /
|
||||
//catalog1.voids[iVoid1].numPart;
|
||||
catalog1.voids[iVoid1].vol;
|
||||
|
@ -383,7 +465,7 @@ int main(int argc, char **argv) {
|
|||
rdist = catalog1.voids[iVoid1].matches[0].dist;
|
||||
rdist /= catalog1.voids[iVoid1].radius;
|
||||
|
||||
fprintf(fp, "%d %.4f %.4f %e %e %.4f %d %d %d %e %e %e\n", voidID,
|
||||
fprintf(fp, "%d %.4f %.4f %e %e %.4f %d %d %d %e %e %e %e %e %e\n", voidID,
|
||||
//fprintf(fp, "%d %.4f %.4f %.4f %.4f %.4f %d %d %d\n", voidID,
|
||||
catalog1.voids[iVoid1].radiusMpc,
|
||||
rRatio,
|
||||
|
@ -395,10 +477,14 @@ int main(int argc, char **argv) {
|
|||
catalog2.voids[iVoid2].voidID,
|
||||
catalog1.voids[iVoid1].matches[0].merit,
|
||||
ellipRatio,
|
||||
catalog1.voids[iVoid1].densCon);
|
||||
catalog1.voids[iVoid1].densCon,
|
||||
cosThetaMaj,
|
||||
majAxisRatio,
|
||||
minAxisRatio
|
||||
);
|
||||
|
||||
} else {
|
||||
fprintf(fp, "%d %.4f 0.0 0.0 0.0 0.0 0.0 0 0 0 0.0 0.0\n", voidID,
|
||||
fprintf(fp, "%d %.4f 0.0 0.0 0.0 0.0 0.0 0 0 0 0.0 0.0 0.0 0.0 0.0\n", voidID,
|
||||
catalog1.voids[iVoid1].radiusMpc);
|
||||
}
|
||||
} // end printing
|
||||
|
@ -601,17 +687,29 @@ void loadCatalog(const char *partFile, const char *volFile,
|
|||
printf(" Loading shapes\n");
|
||||
fp = fopen(shapeFile, "r");
|
||||
iVoid = 0;
|
||||
float tempEllip;
|
||||
float tempEllip, eig[3], eigv1[3], eigv2[3], eigv3[3];
|
||||
fgets(line, sizeof(line), fp);
|
||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
||||
sscanf(line, "%d %f %f %f %f %f %f %f %f %f %f %f %f %f\n",
|
||||
&tempInt, &tempEllip, &tempFloat, &tempFloat, &tempFloat,
|
||||
&tempFloat, &tempFloat, &tempFloat,
|
||||
&tempFloat, &tempFloat, &tempFloat,
|
||||
&tempFloat, &tempFloat, &tempFloat);
|
||||
&tempInt, &tempEllip, &eig[0], &eig[1], &eig[2],
|
||||
&eigv1[0], &eigv1[1], &eigv1[2],
|
||||
&eigv2[0], &eigv2[1], &eigv2[2],
|
||||
&eigv3[0], &eigv3[1], &eigv3[2]);
|
||||
|
||||
//if (iVoid < 10) printf("SHAPE %d %d %e\n", iVoid, catalog.voids[iVoid].voidID, tempEllip);
|
||||
catalog.voids[iVoid].ellipticity = tempEllip;
|
||||
catalog.voids[iVoid].eig[0] = eig[0];
|
||||
catalog.voids[iVoid].eig[1] = eig[1];
|
||||
catalog.voids[iVoid].eig[2] = eig[2];
|
||||
catalog.voids[iVoid].eigv1[0] = eigv1[0];
|
||||
catalog.voids[iVoid].eigv1[1] = eigv1[1];
|
||||
catalog.voids[iVoid].eigv1[2] = eigv1[2];
|
||||
catalog.voids[iVoid].eigv2[0] = eigv2[0];
|
||||
catalog.voids[iVoid].eigv2[1] = eigv2[1];
|
||||
catalog.voids[iVoid].eigv2[2] = eigv2[2];
|
||||
catalog.voids[iVoid].eigv3[0] = eigv3[0];
|
||||
catalog.voids[iVoid].eigv3[1] = eigv3[1];
|
||||
catalog.voids[iVoid].eigv3[2] = eigv3[2];
|
||||
iVoid++;
|
||||
}
|
||||
fclose(fp);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/contour_pixels.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/contour_pixels.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/loadZobov.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/loadZobov.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
@ -168,6 +168,13 @@ bool loadZobov(const char *descName, const char *adjName, const char *voidsName,
|
|||
abort();
|
||||
}
|
||||
|
||||
/*
|
||||
sscanf(line.c_str(), "%d %d %d %f %f %d %d %f %d %f %f\n", &orderId, &volId,
|
||||
&coreParticle, &coreDensity, &volumeZone, &numParticlesInZone,
|
||||
&numZonesInVoid,
|
||||
&volumeVoid, &numInVoid, &densityContrast, &probability);
|
||||
*/
|
||||
|
||||
z.allVoids[volId].proba = probability;
|
||||
z.allVoids[volId].volume = volumeVoid;
|
||||
z.allVoids[volId].numParticles = numInVoid;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/particleInfo.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/particleInfo.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
@ -93,21 +93,25 @@ bool loadParticleInfo(ParticleInfo& info,
|
|||
info.particles.resize(numpart);
|
||||
|
||||
offset = info.ranges[0][0];
|
||||
mul = info.ranges[0][1] - info.ranges[0][0];
|
||||
// TEST PMS NON-COBIC BOXES
|
||||
mul = 1.0;
|
||||
//mul = info.ranges[0][1] - info.ranges[0][0];
|
||||
f.beginCheckpoint();
|
||||
for (int i = 0; i < numpart; i++)
|
||||
info.particles[i].x = mul*f.readReal32();
|
||||
f.endCheckpoint();
|
||||
|
||||
offset = info.ranges[1][0];
|
||||
mul = info.ranges[1][1] - info.ranges[1][0];
|
||||
mul = 1.0;
|
||||
//mul = info.ranges[1][1] - info.ranges[1][0];
|
||||
f.beginCheckpoint();
|
||||
for (int i = 0; i < numpart; i++)
|
||||
info.particles[i].y = mul*f.readReal32();
|
||||
f.endCheckpoint();
|
||||
|
||||
offset = info.ranges[2][0];
|
||||
mul = info.ranges[2][1] - info.ranges[2][0];
|
||||
mul = 1.0;
|
||||
//mul = info.ranges[2][1] - info.ranges[2][0];
|
||||
f.beginCheckpoint();
|
||||
for (int i = 0; i < numpart; i++)
|
||||
info.particles[i].z = mul*f.readReal32();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/generateFromCatalog.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateFromCatalog.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
@ -369,7 +369,7 @@ void generateSurfaceMask(generateFromCatalog_info& args ,
|
|||
fp = fopen("mock_sphere.txt", "w");
|
||||
|
||||
for (int q = 0; q < 0; q++) {
|
||||
//for (int p = 0; p < full_mask_list.size(); p++) {
|
||||
//for (int q = 0; q < full_mask_list.size(); q++) {
|
||||
vec3 v = mask.pix2vec(full_mask_list[q]);
|
||||
|
||||
Position p;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/generateMock.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateMock.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/generateTestMock.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateTestMock.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/basic_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/basic_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/flash_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/flash_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/gadget_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/gadget_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/multidark_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/multidark_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/ramses_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/ramses_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/sdf_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/sdf_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/simulation_loader.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/simulation_loader.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*+
|
||||
VIDE -- Void IDEntification pipeline -- ./c_tools/stacking/pruneVoids.cpp
|
||||
VIDE -- Void IDentification and Examination -- ./c_tools/stacking/pruneVoids.cpp
|
||||
Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
Copyright (C) 2011-2013 P. M. Sutter
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./pipeline/apAnalysis.py
|
||||
# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./crossCompare/analysis/mergerTree.py
|
||||
# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/mergerTree.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./pipeline/apAnalysis.py
|
||||
# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./pipeline/apAnalysis.py
|
||||
# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -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...",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./pipeline/datasets/mergertree.py
|
||||
# VIDE -- Void IDentification and Examination -- ./pipeline/datasets/mergertree.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/pipeline_source/prepareCatalogs.in.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/pipeline_source/prepareCatalogs.in.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -143,6 +143,7 @@ startAPStage = {startAPStage}
|
|||
endAPStage = {endAPStage}
|
||||
|
||||
regenerateFlag = False
|
||||
#ZOBOV_PATH = "@CMAKE_BINARY_DIR@/c_tools/zobov2/"
|
||||
ZOBOV_PATH = "@CMAKE_BINARY_DIR@/zobov/"
|
||||
CTOOLS_PATH = "@CMAKE_BINARY_DIR@/c_tools/"
|
||||
freshStack = True
|
||||
|
@ -180,6 +181,7 @@ numZobovThreads = {numZobovThreads}
|
|||
numZobovDivisions=numZobovDivisions,
|
||||
numZobovThreads=numZobovThreads))
|
||||
|
||||
|
||||
sampleInfo = """
|
||||
newSample = Sample(dataFile = "{dataFile}",
|
||||
dataFormat = "{dataFormat}",
|
||||
|
@ -195,6 +197,7 @@ newSample = Sample(dataFile = "{dataFile}",
|
|||
profileBinSize = "auto",
|
||||
includeInHubble = True,
|
||||
partOfCombo = False,
|
||||
{autoStack}
|
||||
isCombo = False,
|
||||
boxLen = {boxLen},
|
||||
usePecVel = {usePecVel},
|
||||
|
@ -212,24 +215,46 @@ newSample.addStack(0.0, 5.0, 5 , 10, False, False, rescaleMode="rv")
|
|||
newSample.addStack(0.0, 5.0, 10, 15, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 15, 20, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 20, 25, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 25, 30, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 30, 35, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 35, 40, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 40, 45, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 45, 50, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 50, 55, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 55, 60, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 60, 65, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 65, 70, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 70, 75, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 75, 80, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 80, 85, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 85, 90, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 90, 95, False, False, rescaleMode="rv")
|
||||
newSample.addStack(0.0, 5.0, 95, 100, False, False, rescaleMode="rv")
|
||||
"""
|
||||
|
||||
elif stackMode == "auto":
|
||||
stackInfo = """
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+2, True, False, rescaleMode="rv")
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+4, True, False, rescaleMode="rv")
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius}+2, 2*{minRadius}+6, True, False, rescaleMode="rv")
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius}+6, 2*{minRadius}+10, True, False, rescaleMode="rv")
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius}+10, 2*{minRadius}+18, True, False, rescaleMode="rv")
|
||||
newSample.addStack({zMin}, {zMax}, 2*{minRadius}+18, 2*{minRadius}+24, True, False, rescaleMode="rv")
|
||||
"""
|
||||
elif stackMode == "log":
|
||||
stackInfo = ""
|
||||
rMin = 10
|
||||
rMax = 100
|
||||
rStart = rMin
|
||||
rEnd = rMin
|
||||
dlogR = 0.25
|
||||
while rEnd < rMax:
|
||||
rEnd = (1+0.5*dlogR)*rStart/(1-0.5*dlogR)
|
||||
|
||||
stackInfo += """newSample.addStack({zMin}, {zMax}"""+ ", %g, %g, True, False, rescaleMode='rv')" % (rStart, rEnd)
|
||||
|
||||
rStart = rEnd
|
||||
|
||||
# elif stackMode == "auto":
|
||||
# stackInfo = """
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+2, True, False, rescaleMode="rv")
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+4, True, False, rescaleMode="rv")
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius}+2, 2*{minRadius}+6, True, False, rescaleMode="rv")
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius}+6, 2*{minRadius}+10, True, False, rescaleMode="rv")
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius}+10, 2*{minRadius}+18, True, False, rescaleMode="rv")
|
||||
#newSample.addStack({zMin}, {zMax}, 2*{minRadius}+18, 2*{minRadius}+24, True, False, rescaleMode="rv")
|
||||
# """
|
||||
else:
|
||||
stackInfo = """
|
||||
# {zMin}, {zMax}, {minRadius}
|
||||
|
@ -286,6 +311,8 @@ newSample.addStack({zMin}, {zMax}, 2*{minRadius}+18, 2*{minRadius}+24, True, Fal
|
|||
nickName = getNickName(setName, sampleName)
|
||||
|
||||
|
||||
autoStack = ""
|
||||
if stackMode == "auto": autoStack = "autoNumInStack = 400,"
|
||||
scriptFile.write(sampleInfo.format(dataFile=dataFileName,
|
||||
dataFormat=dataFormat,
|
||||
dataUnit=dataUnit,
|
||||
|
@ -297,6 +324,7 @@ newSample.addStack({zMin}, {zMax}, 2*{minRadius}+18, 2*{minRadius}+24, True, Fal
|
|||
zMaxMpc=sliceMaxMpc,
|
||||
omegaM=Om,
|
||||
boxLen=lbox,
|
||||
autoStack=autoStack,
|
||||
usePecVel=useVel,
|
||||
minRadius=minRadius,
|
||||
numSubvolumes=numSubvolumes,
|
||||
|
@ -653,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])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/setup.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/setup.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/apTools/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/apTools/chi2/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/chi2/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/apTools/chi2/cosmologyTools.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/chi2/cosmologyTools.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/apTools/profiles/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/profiles/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/apTools/profiles/getSurveyProps.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/profiles/getSurveyProps.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/backend/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/backend/classes.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/classes.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -58,7 +58,7 @@ class Sample:
|
|||
dataType = "observation"
|
||||
dataFormat = "sdss"
|
||||
dataFile = "lss.dr72dim.dat"
|
||||
dataUNit = 1
|
||||
dataUnit = 1
|
||||
fullName = "lss.dr72dim.dat"
|
||||
nickName = "dim"
|
||||
zobovDir = ""
|
||||
|
@ -72,11 +72,13 @@ class Sample:
|
|||
minVoidRadius = 5
|
||||
fakeDensity = 0.01
|
||||
profileBinSize = 2 # Mpc
|
||||
autoNumInStack = -1 # set to >0 to automatically generate stacks of size N
|
||||
volumeLimited = True
|
||||
includeInHubble = True
|
||||
partOfCombo = False
|
||||
isCombo = False
|
||||
useLCDM = False # if True, convert population to comoving coordinates
|
||||
|
||||
comboList = []
|
||||
|
||||
# applies to simulations only
|
||||
|
@ -99,7 +101,7 @@ class Sample:
|
|||
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
|
||||
useLCDM=False,
|
||||
dataType="observation",
|
||||
subsample=1.0, useLightCone=True):
|
||||
subsample=1.0, useLightCone=True, autoNumInStack=-1):
|
||||
self.dataFile = dataFile
|
||||
self.fullName = fullName
|
||||
self.nickName = nickName
|
||||
|
@ -129,6 +131,7 @@ class Sample:
|
|||
self.useLightCone = useLightCone
|
||||
self.dataUnit = dataUnit
|
||||
self.useLCDM = useLCDM
|
||||
self.autoNumInStack = autoNumInStack
|
||||
|
||||
self.stacks = []
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/backend/launchers.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/launchers.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
@ -35,6 +35,7 @@ import sys
|
|||
from pylab import figure
|
||||
from netCDF4 import Dataset
|
||||
from void_python_tools.backend.classes import *
|
||||
import pickle
|
||||
import void_python_tools.apTools as vp
|
||||
|
||||
NetCDFFile = Dataset
|
||||
|
@ -261,7 +262,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 +330,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", \
|
||||
|
@ -455,8 +476,8 @@ def launchVoidOverlap(sample1, sample2, sample1Dir, sample2Dir,
|
|||
str(sampleName2)+".par"
|
||||
cmd += " --centerFile2=" + sample2Dir + \
|
||||
"/trimmed_nodencut_barycenters_"+thisDataPortion+"_"+str(sampleName2)+".out"
|
||||
cmd += " --shapeFile2=" + sample1Dir + \
|
||||
"/trimmed_nodencut_shapes_"+thisDataPortion+"_"+str(sampleName1)+".out"
|
||||
cmd += " --shapeFile2=" + sample2Dir + \
|
||||
"/trimmed_nodencut_shapes_"+thisDataPortion+"_"+str(sampleName2)+".out"
|
||||
cmd += " --zoneFile2=" + sample2Dir+"/voidZone_" + \
|
||||
str(sampleName2)+".dat"
|
||||
cmd += " --zonePartFile2=" + sample2Dir+"/voidPart_" + \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/plotting/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/plotting/plotDefs.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotDefs.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/plotting/plotTools.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotTools.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#+
|
||||
# VIDE -- Void IDEntification pipeline -- ./python_tools/void_python_tools/plotting/__init__.py
|
||||
# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py
|
||||
# Copyright (C) 2010-2013 Guilhem Lavaux
|
||||
# Copyright (C) 2011-2013 P. M. Sutter
|
||||
#
|
||||
|
|
|
@ -22,7 +22,8 @@ int main(int argc, char *argv[]) {
|
|||
int p;
|
||||
int nvp, nvpall, nvpbuf, nvpmin, nvpmax, nvpbufmin, nvpbufmax; /* yes, the insurance */
|
||||
float width, width2, totwidth, totwidth2, bf, s, g;
|
||||
float border, boxsize;
|
||||
float widthX, widthY, widthZ;
|
||||
float border, boxsize, boxsizeX, boxsizeY, boxsizeZ;
|
||||
float c[3];
|
||||
int numGuards;
|
||||
int b[3];
|
||||
|
@ -34,12 +35,12 @@ int main(int argc, char *argv[]) {
|
|||
printf("arg1: position file\n");
|
||||
printf("arg2: buffer size (default 0.1)\n");
|
||||
printf("arg3: box size\n");
|
||||
printf("arg4: number of divisions (default 2)\n");
|
||||
printf("arg5: suffix describing this run\n");
|
||||
printf("arg6: number of parallel threads\n");
|
||||
printf("arg7: location of voboz executables\n");
|
||||
printf("arg8: output directory\n");
|
||||
printf("arg9: index of mock galaxies\n\n");
|
||||
printf("arg6: number of divisions (default 2)\n");
|
||||
printf("arg7: suffix describing this run\n");
|
||||
printf("arg8: number of parallel threads\n");
|
||||
printf("arg9: location of voboz executables\n");
|
||||
printf("arg10: output directory\n");
|
||||
printf("arg11: index of mock galaxies\n\n");
|
||||
exit(0);
|
||||
}
|
||||
posfile = argv[1];
|
||||
|
@ -81,7 +82,8 @@ int main(int argc, char *argv[]) {
|
|||
np = posread(posfile,&rfloat,1./boxsize);
|
||||
/* Boxsize should be the range in r, yielding a range 0-1 */
|
||||
|
||||
width = 1./(float)numdiv;
|
||||
width = boxsize/(float)numdiv;
|
||||
//width = 1./(float)numdiv;
|
||||
width2 = 0.5*width;
|
||||
if (border > 0.) bf = border;
|
||||
else bf = 0.1;
|
||||
|
@ -171,12 +173,10 @@ int main(int argc, char *argv[]) {
|
|||
for (b[0]=0;b[0]<numdiv; b[0]++) {
|
||||
for (b[1] = 0; b[1] < numdiv; b[1]++) {
|
||||
for (b[2] = 0; b[2] < numdiv; b[2]++) {
|
||||
// TEST
|
||||
fprintf(scr,"%s/voz1b1 %s %f %f,%f,%f %s %d %d %d %d %s&\n",
|
||||
fprintf(scr,"%s/voz1b1 %s %f %f %s %d %d %d %d %s&\n",
|
||||
vobozPath,
|
||||
posfile,border,boxsize,boxsize,boxsize,suffix,numdiv,b[0],b[1],b[2],
|
||||
posfile,border,boxsize,suffix,numdiv,b[0],b[1],b[2],
|
||||
outDir);
|
||||
// END TEST
|
||||
p++;
|
||||
if ((p == numThreads)) { fprintf(scr, "wait\n"); p = 0; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue