Implemented corrections from reviews

This commit is contained in:
Marie Aubert 2018-10-12 11:11:49 +02:00
parent 531a2c30f3
commit 6a5aa85f2f
2 changed files with 8 additions and 8 deletions

View file

@ -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;
if (!f)
{
continue;
}
lastidx = d.index;
// 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;

View file

@ -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