From 6a5aa85f2f864f737630e77673a068a314a2aba9 Mon Sep 17 00:00:00 2001 From: Marie Aubert Date: Fri, 12 Oct 2018 11:11:49 +0200 Subject: [PATCH] Implemented corrections from reviews --- c_tools/mock/generateFromCatalog.cpp | 14 +++++++------- c_tools/stacking/pruneVoids.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/c_tools/mock/generateFromCatalog.cpp b/c_tools/mock/generateFromCatalog.cpp index 7598bc8..d95311d 100644 --- a/c_tools/mock/generateFromCatalog.cpp +++ b/c_tools/mock/generateFromCatalog.cpp @@ -104,16 +104,16 @@ double expanFun (double z, void * p) { void loadData(const string& fname, NYU_VData & data) { ifstream f(fname.c_str()); - int lastidx = -1 ; + while (!f.eof()) { NYU_Data d; f >> d.index >> d.sector >> d.region >> d.ra >> d.dec >> d.cz >> d.fgotten >> d.phi_z; // Maubert - avoid double counting of last particle in array if EOF is after a blank line - if (d.index == lastidx ){ - continue; - } - lastidx = d.index; + if (!f) + { + continue; + } // End Maubert d.uniqueID = d.index; data.push_back(d); @@ -414,7 +414,7 @@ void generateSurfaceMask(generateFromCatalog_info& args , vec3 v = mask.pix2vec(full_mask_list[q]); Position p; - //double r = args.zMin_arg * LIGHT_SPEED; + if (rmin > 0.) { p.xyz[0] = v.x * rmin; @@ -433,7 +433,7 @@ void generateSurfaceMask(generateFromCatalog_info& args , (p.xyz[2])); } - //r = args.zMax_arg * LIGHT_SPEED; + p.xyz[0] = v.x * rmax; p.xyz[1] = v.y * rmax; p.xyz[2] = v.z * rmax; diff --git a/c_tools/stacking/pruneVoids.cpp b/c_tools/stacking/pruneVoids.cpp index f59377b..ba5cddf 100644 --- a/c_tools/stacking/pruneVoids.cpp +++ b/c_tools/stacking/pruneVoids.cpp @@ -921,7 +921,7 @@ int main(int argc, char **argv) { } voids.resize(iGood); - //Maubert - Uncommented this part : to be sure that voids to not cross maximum redshift asked for in zrange + //Maubert - Uncommented this part : to be sure that voids do not cross maximum redshift asked for in zrange iGood = 0; for (iVoid = 0; iVoid < voids.size(); iVoid++) { // just in case