Commit e88e6dc9 authored by Mohcine Chraibi's avatar Mohcine Chraibi

some modifs to plot Rtest13

parent 8cb582b8
Utest/rimea_tests/test_13/flow.png

44.1 KB | W: | H:

Utest/rimea_tests/test_13/flow.png

50.5 KB | W: | H:

Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -34,8 +34,6 @@ def eval_results(results):
std_stair = np.std(results[:, 1])
logging.info("mean corridor: %.2f (+- %.2f), mean stair: %.2f (+- %.2f)",
mean_cor, std_cor, mean_stair, std_stair)
# plt.plot(results[:, 0], "-", lw=2, label="Flow corridor")
# plt.plot(results[:, 1], "-", lw=2, label="Flow stair")
plt.errorbar(range(len(results[:, 0])), results[:, 0],
yerr=std_cor, fmt='-o', lw=2, label="Flow corridor")
plt.errorbar(range(len(results[:, 1])), results[:, 1],
......@@ -43,7 +41,8 @@ def eval_results(results):
plt.ylabel("$J$", size=18)
plt.xlim([-0.5, len(results[:, 0])+0.5])
plt.xlabel("# runs")
plt.title("mean_cor = %f (+-%f), mean_stair = %f (+-%f)"%
(mean_cor, std_cor, mean_stair, std_stair))
plt.legend(loc="best")
plt.savefig("flow.png")
......@@ -78,3 +77,4 @@ if __name__ == "__main__":
......@@ -27,14 +27,14 @@ def run_rimea_test5(inifile, trajfile):
xdiff = np.diff(ptraj[:, 2]) # dx
ydiff = np.diff(ptraj[:, 3]) # dy
if (xdiff!=0).any():
if (xdiff != 0).any():
xfr = ptraj[xdiff != 0][1, 1] # second x element, not first
else:
else:
xfr = np.inf
if (ydiff!=0).any():
if (ydiff != 0).any():
yfr = ptraj[ydiff != 0][1, 1] # second x element, not first
else:
else:
yfr = np.inf
if np.isinf(yfr) and np.isinf(xfr): # ped did not move at all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment