reset to original multidark loading

This commit is contained in:
P.M. Sutter 2013-03-21 21:54:02 -05:00
parent 04eb2a2483
commit cb2b0de143
2 changed files with 8 additions and 8 deletions

View file

@ -453,9 +453,9 @@ void makeBoxFromParameter(SimuData *simu, SimuData* &boxed, generateMock_info& a
boxed->BoxSize = simu->BoxSize;
NcAtt *d_sub = f.get_att("data_subsampling");
if (d_sub == 0 || d_sub->as_double(0) != args_info.subsample_arg)
if (d_sub == 0 || d_sub->as_double(0)/args_info.subsample_arg-1. > 1.e-5)
{
cerr << "Parameter file was not generated with the same simulation subsampling argument. Particles will be different. Stop here." << endl;
cerr << "Parameter file was not generated with the same simulation subsampling argument. Particles will be different. Stop here." << d_sub->as_double(0) << " " << args_info.subsample_arg <<endl;
exit(1);
}

View file

@ -105,15 +105,15 @@ public:
p.Pos[2] == -99 && p.Vel[2] == -99)
break;
p.Pos[0] = p.Pos[0]*rescale_position + shift;
p.Pos[1] = p.Pos[1]*rescale_position + shift;
p.Pos[2] = p.Pos[2]*rescale_position + shift;
p.Vel[2] = p.Vel[2]*rescale_velocity;
//p.Pos[0] = p.Pos[0]*rescale_position + shift;
//p.Pos[1] = p.Pos[1]*rescale_position + shift;
//p.Pos[2] = p.Pos[2]*rescale_position + shift;
//p.Vel[2] = p.Vel[2]*rescale_velocity;
// enforce box size in case of roundoff error
for (int k = 0; k < 3; k++) {
//if (p.Pos[k] < 0) p.Pos[k] += simu->BoxSize;
//if (p.Pos[k] >= simu->BoxSize) p.Pos[k] -= simu->BoxSize;
if (p.Pos[k] < 0) p.Pos[k] += simu->BoxSize;
if (p.Pos[k] >= simu->BoxSize) p.Pos[k] -= simu->BoxSize;
}
if (preproc != 0 && !preproc->accept(p))