This commit is contained in:
Paul Matthew Sutter 2014-01-14 11:06:29 +01:00
parent adb35245de
commit 89082b2f1e
3 changed files with 16 additions and 5 deletions

View file

@ -116,6 +116,11 @@ void metricTransform(SimuData *data, int axis, bool reshift, bool pecvel, double
baseComovingDistance = LIGHT_SPEED/100.* gslIntegrate(e_computer, 0, z0, 1e-3); baseComovingDistance = LIGHT_SPEED/100.* gslIntegrate(e_computer, 0, z0, 1e-3);
cout << "Comoving distance = " << baseComovingDistance << " Mpc/h" << endl; cout << "Comoving distance = " << baseComovingDistance << " Mpc/h" << endl;
if (cosmo_flag) cout << "Will place particles on a lightcone..." << endl;
float minZ = 1.e99;
float maxZ = 0;
for (uint32_t i = 0; i < data->NumPart; i++) for (uint32_t i = 0; i < data->NumPart; i++)
{ {
float& x = data->Pos[x0][i]; float& x = data->Pos[x0][i];
@ -148,8 +153,11 @@ void metricTransform(SimuData *data, int axis, bool reshift, bool pecvel, double
cout << "The offending value is z=" << reduced_red << endl; cout << "The offending value is z=" << reduced_red << endl;
abort(); abort();
} }
if (z > maxZ) maxZ = z;
if (z < minZ) minZ = z;
} }
printf("Range of z: %.2f - %.2f\n", minZ, maxZ);
} }
// slightly perturb particle positions // slightly perturb particle positions

View file

@ -1451,11 +1451,14 @@ def launchHubble(dataPortions=None, dataSampleList=None, logDir=None,
#vp.do_all_obs(zbase, expList, workDir+"/avedistortion_", #vp.do_all_obs(zbase, expList, workDir+"/avedistortion_",
vp.do_all_obs(zbase, expList, aveDistList, vp.do_all_obs(zbase, expList, aveDistList,
rlist, plotTitle=plotTitle, plotAve=True) rlist, plotTitle=plotTitle, plotAve=True)
figure(1).savefig(figDir+"/hubble_"+sampleName+"_"+thisDataPortion+\ figure(1).savefig(figDir+"/hubble_"+setName+"_"+sampleName+"_"+\
thisDataPortion+\
".eps",bbox_inches='tight') ".eps",bbox_inches='tight')
figure(1).savefig(figDir+"/hubble_"+sampleName+"_"+thisDataPortion+\ figure(1).savefig(figDir+"/hubble_"+setName+"_"+sampleName+"_"+\
thisDataPortion+\
".pdf",bbox_inches='tight') ".pdf",bbox_inches='tight')
figure(1).savefig(figDir+"/hubble_"+sampleName+"_"+thisDataPortion+\ figure(1).savefig(figDir+"/hubble_"+setName+"_"+sampleName+"_"+\
thisDataPortion+\
".png",bbox_inches='tight') ".png",bbox_inches='tight')
else: else:
print "Skipping plot" print "Skipping plot"

View file

@ -131,7 +131,7 @@ int main(int argc,char **argv) {
printf("OVERFLOW for particle %d (pending %d). List of accepted:\n", i, j); printf("OVERFLOW for particle %d (pending %d). List of accepted:\n", i, j);
for (q=0;q<p[i].nadj;q++) for (q=0;q<p[i].nadj;q++)
printf(" %d\n", p[i].adj[q]); printf(" %d\n", p[i].adj[q]);
abort(); //abort();
} }
if (p[j].ncnt == p[j].nadj) if (p[j].ncnt == p[j].nadj)
{ {
@ -139,7 +139,7 @@ int main(int argc,char **argv) {
printf("OVERFLOW for particle %d (pending %d). List of accepted:\n", j, i); printf("OVERFLOW for particle %d (pending %d). List of accepted:\n", j, i);
for (q=0;q<p[j].nadj;q++) for (q=0;q<p[j].nadj;q++)
printf(" %d\n", p[j].adj[q]); printf(" %d\n", p[j].adj[q]);
abort(); //abort();
} }
p[i].adj[p[i].ncnt] = j; p[i].adj[p[i].ncnt] = j;