import os, sys import seaborn from pylab import rcParams import cv2 import numpy as np from numpy import linalg as LA from time import time from itertools import combinations import matplotlib.pyplot as plt from matplotlib.pyplot import * import matplotlib.patches as mpatches # activate latex text rendering #rc('text', usetex=True) def main(argv): # path = str(argv[0]) #/home/Julian/3D_Pupil_Project/work/results/2D2D/3_calibration_depths/p5.csv path ="/home/mmbrian/3D_Gaze_Tracking/work/results/2D3D/3_calibration_depths/" Data1 = np.load(path + "p5.npy") Data2 = np.load(path + "p7.npy") Data3 = np.load(path + "p10.npy") Data4 = np.load(path + "p11.npy") Data5 = np.load(path + "p12.npy") Data6 = np.load(path + "p13.npy") Data7 = np.load(path + "p14.npy") Data8 = np.load(path + "p15.npy") Data9 = np.load(path + "p16.npy") Data10 = np.load(path + "p20.npy") Data11 = np.load(path + "p21.npy") Data12 = np.load(path + "p24.npy") Data13 = np.load(path + "p25.npy") Data14 = np.load(path + "p26.npy") Data = [Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Data9,Data10,Data11,Data12,Data13,Data14] AngularerrorC1 = [] for i in xrange(5): AngularerrorC1.append([]) for j in xrange(14): AngularerrorC1[i].append(float(0)) AngularerrorC2 = [] for i in xrange(5): AngularerrorC2.append([]) for j in xrange(14): AngularerrorC2[i].append(float(0)) AngularerrorC3 = [] for i in xrange(5): AngularerrorC3.append([]) for j in xrange(14): AngularerrorC3[i].append(float(0)) AngularerrorC4 = [] for i in xrange(5): AngularerrorC4.append([]) for j in xrange(14): AngularerrorC4[i].append(float(0)) AngularerrorC5 = [] for i in xrange(5): AngularerrorC5.append([]) for j in xrange(14): AngularerrorC5[i].append(float(0)) AngularerrorC6 = [] for i in xrange(5): AngularerrorC6.append([]) for j in xrange(14): AngularerrorC6[i].append(float(0)) AngularerrorC7 = [] for i in xrange(5): AngularerrorC7.append([]) for j in xrange(14): AngularerrorC7[i].append(float(0)) AngularerrorC8 = [] for i in xrange(5): AngularerrorC8.append([]) for j in xrange(14): AngularerrorC8[i].append(float(0)) AngularerrorC9 = [] for i in xrange(5): AngularerrorC9.append([]) for j in xrange(14): AngularerrorC9[i].append(float(0)) AngularerrorC10 = [] for i in xrange(5): AngularerrorC10.append([]) for j in xrange(14): AngularerrorC10[i].append(float(0)) # Combi1 1,1.25,1.5 distance1 = 1.0 distance2 = 1.25 distance3 = 1.5 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3: AngularerrorC1[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3: AngularerrorC1[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3: AngularerrorC1[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3: AngularerrorC1[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3: AngularerrorC1[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC1: ", AngularerrorC1[0] print "AngularerrorC2: ", AngularerrorC1[1] print "AngularerrorC3: ", AngularerrorC1[2] print "AngularerrorC4: ", AngularerrorC1[3] print "AngularerrorC5: ", AngularerrorC1[4] meanC1D1 = np.mean(AngularerrorC1[0]) meanC1D2 = np.mean(AngularerrorC1[1]) meanC1D3 = np.mean(AngularerrorC1[2]) meanC1D4 = np.mean(AngularerrorC1[3]) meanC1D5 = np.mean(AngularerrorC1[4]) stdC1D1 = np.std(AngularerrorC1[0]) stdC1D2 = np.std(AngularerrorC1[1]) stdC1D3 = np.std(AngularerrorC1[2]) stdC1D4 = np.std(AngularerrorC1[3]) stdC1D5 = np.std(AngularerrorC1[4]) meanC1 = [meanC1D1,meanC1D2,meanC1D3,meanC1D4,meanC1D5] stdC1 = [stdC1D1,stdC1D2,stdC1D3,stdC1D4,stdC1D5] # Combi2 1,1.25,1.75 distance1 = 1.0 distance2 = 1.25 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC2[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC2[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC2[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC2[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC2[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC1: ", AngularerrorC2[0] print "AngularerrorC2: ", AngularerrorC2[1] print "AngularerrorC3: ", AngularerrorC2[2] print "AngularerrorC4: ", AngularerrorC2[3] print "AngularerrorC5: ", AngularerrorC2[4] meanC2D1 = np.mean(AngularerrorC2[0]) meanC2D2 = np.mean(AngularerrorC2[1]) meanC2D3 = np.mean(AngularerrorC2[2]) meanC2D4 = np.mean(AngularerrorC2[3]) meanC2D5 = np.mean(AngularerrorC2[4]) stdC2D1 = np.std(AngularerrorC2[0]) stdC2D2 = np.std(AngularerrorC2[1]) stdC2D3 = np.std(AngularerrorC2[2]) stdC2D4 = np.std(AngularerrorC2[3]) stdC2D5 = np.std(AngularerrorC2[4]) meanC2 = [meanC2D1,meanC2D2,meanC2D3,meanC2D4,meanC2D5] stdC2 = [stdC2D1,stdC2D2,stdC2D3,stdC2D4,stdC2D5] # Combi3 1,1.25,2.0 distance1 = 1.0 distance2 = 1.25 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC3[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC3[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC3[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC3[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC3[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC1: ", AngularerrorC3[0] print "AngularerrorC2: ", AngularerrorC3[1] print "AngularerrorC3: ", AngularerrorC3[2] print "AngularerrorC4: ", AngularerrorC3[3] print "AngularerrorC5: ", AngularerrorC3[4] meanC3D1 = np.mean(AngularerrorC3[0]) meanC3D2 = np.mean(AngularerrorC3[1]) meanC3D3 = np.mean(AngularerrorC3[2]) meanC3D4 = np.mean(AngularerrorC3[3]) meanC3D5 = np.mean(AngularerrorC3[4]) stdC3D1 = np.std(AngularerrorC3[0]) stdC3D2 = np.std(AngularerrorC3[1]) stdC3D3 = np.std(AngularerrorC3[2]) stdC3D4 = np.std(AngularerrorC3[3]) stdC3D5 = np.std(AngularerrorC3[4]) meanC3 = [meanC3D1,meanC3D2,meanC3D3,meanC3D4,meanC3D5] stdC3 = [stdC3D1,stdC3D2,stdC3D3,stdC3D4,stdC3D5] # Combi4 1,1.5,1.75 distance1 = 1.0 distance2 = 1.5 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC4[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC4[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC4[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC4[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC4[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC4: ", AngularerrorC4[0] print "AngularerrorC2: ", AngularerrorC4[1] print "AngularerrorC3: ", AngularerrorC4[2] print "AngularerrorC4: ", AngularerrorC4[3] print "AngularerrorC5: ", AngularerrorC4[4] meanC4D1 = np.mean(AngularerrorC4[0]) meanC4D2 = np.mean(AngularerrorC4[1]) meanC4D3 = np.mean(AngularerrorC4[2]) meanC4D4 = np.mean(AngularerrorC4[3]) meanC4D5 = np.mean(AngularerrorC4[4]) stdC4D1 = np.std(AngularerrorC4[0]) stdC4D2 = np.std(AngularerrorC4[1]) stdC4D3 = np.std(AngularerrorC4[2]) stdC4D4 = np.std(AngularerrorC4[3]) stdC4D5 = np.std(AngularerrorC4[4]) meanC4 = [meanC4D1,meanC4D2,meanC4D3,meanC4D4,meanC4D5] stdC4 = [stdC4D1,stdC4D2,stdC4D3,stdC4D4,stdC4D5] # Combi5 1.0,1.5,2.0 distance1 = 1.0 distance2 = 1.5 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC5[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC5[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC5[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC5[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC5[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC5: ", AngularerrorC5[0] print "AngularerrorC2: ", AngularerrorC5[1] print "AngularerrorC3: ", AngularerrorC5[2] print "AngularerrorC4: ", AngularerrorC5[3] print "AngularerrorC5: ", AngularerrorC5[4] meanC5D1 = np.mean(AngularerrorC5[0]) meanC5D2 = np.mean(AngularerrorC5[1]) meanC5D3 = np.mean(AngularerrorC5[2]) meanC5D4 = np.mean(AngularerrorC5[3]) meanC5D5 = np.mean(AngularerrorC5[4]) stdC5D1 = np.std(AngularerrorC5[0]) stdC5D2 = np.std(AngularerrorC5[1]) stdC5D3 = np.std(AngularerrorC5[2]) stdC5D4 = np.std(AngularerrorC5[3]) stdC5D5 = np.std(AngularerrorC5[4]) meanC5 = [meanC5D1,meanC5D2,meanC5D3,meanC5D4,meanC5D5] stdC5 = [stdC5D1,stdC5D2,stdC5D3,stdC5D4,stdC5D5] # Combi6 1.0,1.75,2.0 distance1 = 1.0 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC6[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC6[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC6[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC6[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC6[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC6: ", AngularerrorC6[0] print "AngularerrorC2: ", AngularerrorC6[1] print "AngularerrorC3: ", AngularerrorC6[2] print "AngularerrorC4: ", AngularerrorC6[3] print "AngularerrorC5: ", AngularerrorC6[4] meanC6D1 = np.mean(AngularerrorC6[0]) meanC6D2 = np.mean(AngularerrorC6[1]) meanC6D3 = np.mean(AngularerrorC6[2]) meanC6D4 = np.mean(AngularerrorC6[3]) meanC6D5 = np.mean(AngularerrorC6[4]) stdC6D1 = np.std(AngularerrorC6[0]) stdC6D2 = np.std(AngularerrorC6[1]) stdC6D3 = np.std(AngularerrorC6[2]) stdC6D4 = np.std(AngularerrorC6[3]) stdC6D5 = np.std(AngularerrorC6[4]) meanC6 = [meanC6D1,meanC6D2,meanC6D3,meanC6D4,meanC6D5] stdC6 = [stdC6D1,stdC6D2,stdC6D3,stdC6D4,stdC6D5] # Combi7 1.25,1.5,1,75 distance1 = 1.25 distance2 = 1.5 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC7[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC7[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC7[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC7[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC7[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC7: ", AngularerrorC7[0] print "AngularerrorC2: ", AngularerrorC7[1] print "AngularerrorC3: ", AngularerrorC7[2] print "AngularerrorC4: ", AngularerrorC7[3] print "AngularerrorC5: ", AngularerrorC7[4] meanC7D1 = np.mean(AngularerrorC7[0]) meanC7D2 = np.mean(AngularerrorC7[1]) meanC7D3 = np.mean(AngularerrorC7[2]) meanC7D4 = np.mean(AngularerrorC7[3]) meanC7D5 = np.mean(AngularerrorC7[4]) stdC7D1 = np.std(AngularerrorC7[0]) stdC7D2 = np.std(AngularerrorC7[1]) stdC7D3 = np.std(AngularerrorC7[2]) stdC7D4 = np.std(AngularerrorC7[3]) stdC7D5 = np.std(AngularerrorC7[4]) meanC7 = [meanC7D1,meanC7D2,meanC7D3,meanC7D4,meanC7D5] stdC7 = [stdC7D1,stdC7D2,stdC7D3,stdC7D4,stdC7D5] # Combi8 1.25,1.5,2.0 distance1 = 1.25 distance2 = 1.5 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC8[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC8[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC8[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC8[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC8[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC8: ", AngularerrorC8[0] print "AngularerrorC2: ", AngularerrorC8[1] print "AngularerrorC3: ", AngularerrorC8[2] print "AngularerrorC4: ", AngularerrorC8[3] print "AngularerrorC5: ", AngularerrorC8[4] meanC8D1 = np.mean(AngularerrorC8[0]) meanC8D2 = np.mean(AngularerrorC8[1]) meanC8D3 = np.mean(AngularerrorC8[2]) meanC8D4 = np.mean(AngularerrorC8[3]) meanC8D5 = np.mean(AngularerrorC8[4]) stdC8D1 = np.std(AngularerrorC8[0]) stdC8D2 = np.std(AngularerrorC8[1]) stdC8D3 = np.std(AngularerrorC8[2]) stdC8D4 = np.std(AngularerrorC8[3]) stdC8D5 = np.std(AngularerrorC8[4]) meanC8 = [meanC8D1,meanC8D2,meanC8D3,meanC8D4,meanC8D5] stdC8 = [stdC8D1,stdC8D2,stdC8D3,stdC8D4,stdC8D5] # Combi9 1.25,1.75,2.0 distance1 = 1.25 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC9[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC9[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC9[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC9[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC9[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC9: ", AngularerrorC9[0] print "AngularerrorC2: ", AngularerrorC9[1] print "AngularerrorC3: ", AngularerrorC9[2] print "AngularerrorC4: ", AngularerrorC9[3] print "AngularerrorC5: ", AngularerrorC9[4] meanC9D1 = np.mean(AngularerrorC9[0]) meanC9D2 = np.mean(AngularerrorC9[1]) meanC9D3 = np.mean(AngularerrorC9[2]) meanC9D4 = np.mean(AngularerrorC9[3]) meanC9D5 = np.mean(AngularerrorC9[4]) stdC9D1 = np.std(AngularerrorC9[0]) stdC9D2 = np.std(AngularerrorC9[1]) stdC9D3 = np.std(AngularerrorC9[2]) stdC9D4 = np.std(AngularerrorC9[3]) stdC9D5 = np.std(AngularerrorC9[4]) meanC9 = [meanC9D1,meanC9D2,meanC9D3,meanC9D4,meanC9D5] stdC9 = [stdC9D1,stdC9D2,stdC9D3,stdC9D4,stdC9D5] # Combi10 1.5,1.75,2.0 distance1 = 1.5 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Data[i][j][1], Data[i][j][1] if Data[i][j][3] == 1.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC10[0][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Data[i][j][3] == 1.25 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC10[1][i] = Data[i][j][4] # i = 14 break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.5 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC10[2][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 1.75 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC10[3][i] = Data[i][j][4] break else: j += 1 j = 0 while j < 50: if Data[i][j][3] == 2.0 and Data[i][j][0] == distance1 and Data[i][j][1] == distance2 and Data[i][j][2] == distance3 : AngularerrorC10[4][i] = Data[i][j][4] break else: j += 1 i += 1 print "AngularerrorC10: ", AngularerrorC10[0] print "AngularerrorC2: ", AngularerrorC10[1] print "AngularerrorC3: ", AngularerrorC10[2] print "AngularerrorC4: ", AngularerrorC10[3] print "AngularerrorC5: ", AngularerrorC10[4] meanC10D1 = np.mean(AngularerrorC10[0]) meanC10D2 = np.mean(AngularerrorC10[1]) meanC10D3 = np.mean(AngularerrorC10[2]) meanC10D4 = np.mean(AngularerrorC10[3]) meanC10D5 = np.mean(AngularerrorC10[4]) stdC10D1 = np.std(AngularerrorC10[0]) stdC10D2 = np.std(AngularerrorC10[1]) stdC10D3 = np.std(AngularerrorC10[2]) stdC10D4 = np.std(AngularerrorC10[3]) stdC10D5 = np.std(AngularerrorC10[4]) meanC10 = [meanC10D1,meanC10D2,meanC10D3,meanC10D4,meanC10D5] stdC10 = [stdC10D1,stdC10D2,stdC10D3,stdC10D4,stdC10D5] ##################################################################################### path ="/home/mmbrian/3D_Gaze_Tracking/work/results/2D2D/3_calibration_depths/" Datatwo1 = np.load(path + "p5.npy") Datatwo2 = np.load(path + "p7.npy") Datatwo3 = np.load(path + "p10.npy") Datatwo4 = np.load(path + "p11.npy") Datatwo5 = np.load(path + "p12.npy") Datatwo6 = np.load(path + "p13.npy") Datatwo7 = np.load(path + "p14.npy") Datatwo8 = np.load(path + "p15.npy") Datatwo9 = np.load(path + "p16.npy") Datatwo10 = np.load(path + "p20.npy") Datatwo11 = np.load(path + "p21.npy") Datatwo12 = np.load(path + "p24.npy") Datatwo13 = np.load(path + "p25.npy") Datatwo14 = np.load(path + "p26.npy") Datatwo = [Datatwo1,Datatwo2,Datatwo3,Datatwo4,Datatwo5,Datatwo6,Datatwo7,Datatwo8,Datatwo9,Datatwo10,Datatwo11,Datatwo12,Datatwo13,Datatwo14] AngularerrorCtwo1 = [] for i in xrange(5): AngularerrorCtwo1.append([]) for j in xrange(14): AngularerrorCtwo1[i].append(float(0)) AngularerrorCtwo2 = [] for i in xrange(5): AngularerrorCtwo2.append([]) for j in xrange(14): AngularerrorCtwo2[i].append(float(0)) AngularerrorCtwo3 = [] for i in xrange(5): AngularerrorCtwo3.append([]) for j in xrange(14): AngularerrorCtwo3[i].append(float(0)) AngularerrorCtwo4 = [] for i in xrange(5): AngularerrorCtwo4.append([]) for j in xrange(14): AngularerrorCtwo4[i].append(float(0)) AngularerrorCtwo5 = [] for i in xrange(5): AngularerrorCtwo5.append([]) for j in xrange(14): AngularerrorCtwo5[i].append(float(0)) AngularerrorCtwo6 = [] for i in xrange(5): AngularerrorCtwo6.append([]) for j in xrange(14): AngularerrorCtwo6[i].append(float(0)) AngularerrorCtwo7 = [] for i in xrange(5): AngularerrorCtwo7.append([]) for j in xrange(14): AngularerrorCtwo7[i].append(float(0)) AngularerrorCtwo8 = [] for i in xrange(5): AngularerrorCtwo8.append([]) for j in xrange(14): AngularerrorCtwo8[i].append(float(0)) AngularerrorCtwo9 = [] for i in xrange(5): AngularerrorCtwo9.append([]) for j in xrange(14): AngularerrorCtwo9[i].append(float(0)) AngularerrorCtwo10 = [] for i in xrange(5): AngularerrorCtwo10.append([]) for j in xrange(14): AngularerrorCtwo10[i].append(float(0)) # Combi1 1,1.25,1.5 distance1 = 1.0 distance2 = 1.25 distance3 = 1.5 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3: AngularerrorCtwo1[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3: AngularerrorCtwo1[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3: AngularerrorCtwo1[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3: AngularerrorCtwo1[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3: AngularerrorCtwo1[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo1: ", AngularerrorCtwo1[0] print "AngularerrorCtwo2: ", AngularerrorCtwo1[1] print "AngularerrorCtwo3: ", AngularerrorCtwo1[2] print "AngularerrorCtwo4: ", AngularerrorCtwo1[3] print "AngularerrorCtwo5: ", AngularerrorCtwo1[4] meantwoC1D1 = np.mean(AngularerrorCtwo1[0]) meantwoC1D2 = np.mean(AngularerrorCtwo1[1]) meantwoC1D3 = np.mean(AngularerrorCtwo1[2]) meantwoC1D4 = np.mean(AngularerrorCtwo1[3]) meantwoC1D5 = np.mean(AngularerrorCtwo1[4]) stdtwoC1D1 = np.std(AngularerrorCtwo1[0]) stdtwoC1D2 = np.std(AngularerrorCtwo1[1]) stdtwoC1D3 = np.std(AngularerrorCtwo1[2]) stdtwoC1D4 = np.std(AngularerrorCtwo1[3]) stdtwoC1D5 = np.std(AngularerrorCtwo1[4]) meantwoC1 = [meantwoC1D1,meantwoC1D2,meantwoC1D3,meantwoC1D4,meantwoC1D5] stdtwoC1 = [stdtwoC1D1,stdtwoC1D2,stdtwoC1D3,stdtwoC1D4,stdtwoC1D5] # Combi2 1,1.25,1.75 distance1 = 1.0 distance2 = 1.25 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo2[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo2[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo2[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo2[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo2[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo1: ", AngularerrorCtwo2[0] print "AngularerrorCtwo2: ", AngularerrorCtwo2[1] print "AngularerrorCtwo3: ", AngularerrorCtwo2[2] print "AngularerrorCtwo4: ", AngularerrorCtwo2[3] print "AngularerrorCtwo5: ", AngularerrorCtwo2[4] meantwoC2D1 = np.mean(AngularerrorCtwo2[0]) meantwoC2D2 = np.mean(AngularerrorCtwo2[1]) meantwoC2D3 = np.mean(AngularerrorCtwo2[2]) meantwoC2D4 = np.mean(AngularerrorCtwo2[3]) meantwoC2D5 = np.mean(AngularerrorCtwo2[4]) stdtwoC2D1 = np.std(AngularerrorCtwo2[0]) stdtwoC2D2 = np.std(AngularerrorCtwo2[1]) stdtwoC2D3 = np.std(AngularerrorCtwo2[2]) stdtwoC2D4 = np.std(AngularerrorCtwo2[3]) stdtwoC2D5 = np.std(AngularerrorCtwo2[4]) meantwoC2 = [meantwoC2D1,meantwoC2D2,meantwoC2D3,meantwoC2D4,meantwoC2D5] stdtwoC2 = [stdtwoC2D1,stdtwoC2D2,stdtwoC2D3,stdtwoC2D4,stdtwoC2D5] # Combi3 1,1.25,2.0 distance1 = 1.0 distance2 = 1.25 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo3[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo3[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo3[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo3[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo3[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo1: ", AngularerrorCtwo3[0] print "AngularerrorCtwo2: ", AngularerrorCtwo3[1] print "AngularerrorCtwo3: ", AngularerrorCtwo3[2] print "AngularerrorCtwo4: ", AngularerrorCtwo3[3] print "AngularerrorCtwo5: ", AngularerrorCtwo3[4] meantwoC3D1 = np.mean(AngularerrorCtwo3[0]) meantwoC3D2 = np.mean(AngularerrorCtwo3[1]) meantwoC3D3 = np.mean(AngularerrorCtwo3[2]) meantwoC3D4 = np.mean(AngularerrorCtwo3[3]) meantwoC3D5 = np.mean(AngularerrorCtwo3[4]) stdtwoC3D1 = np.std(AngularerrorCtwo3[0]) stdtwoC3D2 = np.std(AngularerrorCtwo3[1]) stdtwoC3D3 = np.std(AngularerrorCtwo3[2]) stdtwoC3D4 = np.std(AngularerrorCtwo3[3]) stdtwoC3D5 = np.std(AngularerrorCtwo3[4]) meantwoC3 = [meantwoC3D1,meantwoC3D2,meantwoC3D3,meantwoC3D4,meantwoC3D5] stdtwoC3 = [stdtwoC3D1,stdtwoC3D2,stdtwoC3D3,stdtwoC3D4,stdtwoC3D5] # Combi4 1,1.5,1.75 distance1 = 1.0 distance2 = 1.5 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo4[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo4[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo4[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo4[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo4[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo4: ", AngularerrorCtwo4[0] print "AngularerrorCtwo2: ", AngularerrorCtwo4[1] print "AngularerrorCtwo3: ", AngularerrorCtwo4[2] print "AngularerrorCtwo4: ", AngularerrorCtwo4[3] print "AngularerrorCtwo5: ", AngularerrorCtwo4[4] meantwoC4D1 = np.mean(AngularerrorCtwo4[0]) meantwoC4D2 = np.mean(AngularerrorCtwo4[1]) meantwoC4D3 = np.mean(AngularerrorCtwo4[2]) meantwoC4D4 = np.mean(AngularerrorCtwo4[3]) meantwoC4D5 = np.mean(AngularerrorCtwo4[4]) stdtwoC4D1 = np.std(AngularerrorCtwo4[0]) stdtwoC4D2 = np.std(AngularerrorCtwo4[1]) stdtwoC4D3 = np.std(AngularerrorCtwo4[2]) stdtwoC4D4 = np.std(AngularerrorCtwo4[3]) stdtwoC4D5 = np.std(AngularerrorCtwo4[4]) meantwoC4 = [meantwoC4D1,meantwoC4D2,meantwoC4D3,meantwoC4D4,meantwoC4D5] stdtwoC4 = [stdtwoC4D1,stdtwoC4D2,stdtwoC4D3,stdtwoC4D4,stdtwoC4D5] # Combi5 1.0,1.5,2.0 distance1 = 1.0 distance2 = 1.5 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo5[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo5[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo5[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo5[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo5[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo5: ", AngularerrorCtwo5[0] print "AngularerrorCtwo2: ", AngularerrorCtwo5[1] print "AngularerrorCtwo3: ", AngularerrorCtwo5[2] print "AngularerrorCtwo4: ", AngularerrorCtwo5[3] print "AngularerrorCtwo5: ", AngularerrorCtwo5[4] meantwoC5D1 = np.mean(AngularerrorCtwo5[0]) meantwoC5D2 = np.mean(AngularerrorCtwo5[1]) meantwoC5D3 = np.mean(AngularerrorCtwo5[2]) meantwoC5D4 = np.mean(AngularerrorCtwo5[3]) meantwoC5D5 = np.mean(AngularerrorCtwo5[4]) stdtwoC5D1 = np.std(AngularerrorCtwo5[0]) stdtwoC5D2 = np.std(AngularerrorCtwo5[1]) stdtwoC5D3 = np.std(AngularerrorCtwo5[2]) stdtwoC5D4 = np.std(AngularerrorCtwo5[3]) stdtwoC5D5 = np.std(AngularerrorCtwo5[4]) meantwoC5 = [meantwoC5D1,meantwoC5D2,meantwoC5D3,meantwoC5D4,meantwoC5D5] stdtwoC5 = [stdtwoC5D1,stdtwoC5D2,stdtwoC5D3,stdtwoC5D4,stdtwoC5D5] # Combi6 1.0,1.75,2.0 distance1 = 1.0 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo6[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo6[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo6[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo6[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo6[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo6: ", AngularerrorCtwo6[0] print "AngularerrorCtwo2: ", AngularerrorCtwo6[1] print "AngularerrorCtwo3: ", AngularerrorCtwo6[2] print "AngularerrorCtwo4: ", AngularerrorCtwo6[3] print "AngularerrorCtwo5: ", AngularerrorCtwo6[4] meantwoC6D1 = np.mean(AngularerrorCtwo6[0]) meantwoC6D2 = np.mean(AngularerrorCtwo6[1]) meantwoC6D3 = np.mean(AngularerrorCtwo6[2]) meantwoC6D4 = np.mean(AngularerrorCtwo6[3]) meantwoC6D5 = np.mean(AngularerrorCtwo6[4]) stdtwoC6D1 = np.std(AngularerrorCtwo6[0]) stdtwoC6D2 = np.std(AngularerrorCtwo6[1]) stdtwoC6D3 = np.std(AngularerrorCtwo6[2]) stdtwoC6D4 = np.std(AngularerrorCtwo6[3]) stdtwoC6D5 = np.std(AngularerrorCtwo6[4]) meantwoC6 = [meantwoC6D1,meantwoC6D2,meantwoC6D3,meantwoC6D4,meantwoC6D5] stdtwoC6 = [stdtwoC6D1,stdtwoC6D2,stdtwoC6D3,stdtwoC6D4,stdtwoC6D5] # Combi7 1.25,1.5,1,75 distance1 = 1.25 distance2 = 1.5 distance3 = 1.75 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo7[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo7[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo7[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo7[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo7[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo7: ", AngularerrorCtwo7[0] print "AngularerrorCtwo2: ", AngularerrorCtwo7[1] print "AngularerrorCtwo3: ", AngularerrorCtwo7[2] print "AngularerrorCtwo4: ", AngularerrorCtwo7[3] print "AngularerrorCtwo5: ", AngularerrorCtwo7[4] meantwoC7D1 = np.mean(AngularerrorCtwo7[0]) meantwoC7D2 = np.mean(AngularerrorCtwo7[1]) meantwoC7D3 = np.mean(AngularerrorCtwo7[2]) meantwoC7D4 = np.mean(AngularerrorCtwo7[3]) meantwoC7D5 = np.mean(AngularerrorCtwo7[4]) stdtwoC7D1 = np.std(AngularerrorCtwo7[0]) stdtwoC7D2 = np.std(AngularerrorCtwo7[1]) stdtwoC7D3 = np.std(AngularerrorCtwo7[2]) stdtwoC7D4 = np.std(AngularerrorCtwo7[3]) stdtwoC7D5 = np.std(AngularerrorCtwo7[4]) meantwoC7 = [meantwoC7D1,meantwoC7D2,meantwoC7D3,meantwoC7D4,meantwoC7D5] stdtwoC7 = [stdtwoC7D1,stdtwoC7D2,stdtwoC7D3,stdtwoC7D4,stdtwoC7D5] # Combi8 1.25,1.5,2.0 distance1 = 1.25 distance2 = 1.5 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo8[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo8[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo8[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo8[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo8[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo8: ", AngularerrorCtwo8[0] print "AngularerrorCtwo2: ", AngularerrorCtwo8[1] print "AngularerrorCtwo3: ", AngularerrorCtwo8[2] print "AngularerrorCtwo4: ", AngularerrorCtwo8[3] print "AngularerrorCtwo5: ", AngularerrorCtwo8[4] meantwoC8D1 = np.mean(AngularerrorCtwo8[0]) meantwoC8D2 = np.mean(AngularerrorCtwo8[1]) meantwoC8D3 = np.mean(AngularerrorCtwo8[2]) meantwoC8D4 = np.mean(AngularerrorCtwo8[3]) meantwoC8D5 = np.mean(AngularerrorCtwo8[4]) stdtwoC8D1 = np.std(AngularerrorCtwo8[0]) stdtwoC8D2 = np.std(AngularerrorCtwo8[1]) stdtwoC8D3 = np.std(AngularerrorCtwo8[2]) stdtwoC8D4 = np.std(AngularerrorCtwo8[3]) stdtwoC8D5 = np.std(AngularerrorCtwo8[4]) meantwoC8 = [meantwoC8D1,meantwoC8D2,meantwoC8D3,meantwoC8D4,meantwoC8D5] stdtwoC8 = [stdtwoC8D1,stdtwoC8D2,stdtwoC8D3,stdtwoC8D4,stdtwoC8D5] # Combi9 1.25,1.75,2.0 distance1 = 1.25 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo9[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo9[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo9[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo9[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo9[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo9: ", AngularerrorCtwo9[0] print "AngularerrorCtwo2: ", AngularerrorCtwo9[1] print "AngularerrorCtwo3: ", AngularerrorCtwo9[2] print "AngularerrorCtwo4: ", AngularerrorCtwo9[3] print "AngularerrorCtwo5: ", AngularerrorCtwo9[4] meantwoC9D1 = np.mean(AngularerrorCtwo9[0]) meantwoC9D2 = np.mean(AngularerrorCtwo9[1]) meantwoC9D3 = np.mean(AngularerrorCtwo9[2]) meantwoC9D4 = np.mean(AngularerrorCtwo9[3]) meantwoC9D5 = np.mean(AngularerrorCtwo9[4]) stdtwoC9D1 = np.std(AngularerrorCtwo9[0]) stdtwoC9D2 = np.std(AngularerrorCtwo9[1]) stdtwoC9D3 = np.std(AngularerrorCtwo9[2]) stdtwoC9D4 = np.std(AngularerrorCtwo9[3]) stdtwoC9D5 = np.std(AngularerrorCtwo9[4]) meantwoC9 = [meantwoC9D1,meantwoC9D2,meantwoC9D3,meantwoC9D4,meantwoC9D5] stdtwoC9 = [stdtwoC9D1,stdtwoC9D2,stdtwoC9D3,stdtwoC9D4,stdtwoC9D5] # Combi10 1.5,1.75,2.0 distance1 = 1.5 distance2 = 1.75 distance3 = 2.0 i = 0 while i < 14: j = 0 while j < 50: # print "i: ", i," j: ", j # print Datatwo[i][j][1], Datatwo[i][j][1] if Datatwo[i][j][3] == 1.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo10[0][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: # print "i: ", i," j: ", j if Datatwo[i][j][3] == 1.25 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo10[1][i] = Datatwo[i][j][9] # i = 14 break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.5 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo10[2][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 1.75 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo10[3][i] = Datatwo[i][j][9] break else: j += 1 j = 0 while j < 50: if Datatwo[i][j][3] == 2.0 and Datatwo[i][j][0] == distance1 and Datatwo[i][j][1] == distance2 and Datatwo[i][j][2] == distance3 : AngularerrorCtwo10[4][i] = Datatwo[i][j][9] break else: j += 1 i += 1 print "AngularerrorCtwo10: ", AngularerrorCtwo10[0] print "AngularerrorCtwo2: ", AngularerrorCtwo10[1] print "AngularerrorCtwo3: ", AngularerrorCtwo10[2] print "AngularerrorCtwo4: ", AngularerrorCtwo10[3] print "AngularerrorCtwo5: ", AngularerrorCtwo10[4] meantwoC10D1 = np.mean(AngularerrorCtwo10[0]) meantwoC10D2 = np.mean(AngularerrorCtwo10[1]) meantwoC10D3 = np.mean(AngularerrorCtwo10[2]) meantwoC10D4 = np.mean(AngularerrorCtwo10[3]) meantwoC10D5 = np.mean(AngularerrorCtwo10[4]) stdtwoC10D1 = np.std(AngularerrorCtwo10[0]) stdtwoC10D2 = np.std(AngularerrorCtwo10[1]) stdtwoC10D3 = np.std(AngularerrorCtwo10[2]) stdtwoC10D4 = np.std(AngularerrorCtwo10[3]) stdtwoC10D5 = np.std(AngularerrorCtwo10[4]) meantwoC10 = [meantwoC10D1,meantwoC10D2,meantwoC10D3,meantwoC10D4,meantwoC10D5] stdtwoC10 = [stdtwoC10D1,stdtwoC10D2,stdtwoC10D3,stdtwoC10D4,stdtwoC10D5] ##################################################################################### ## C2 # distance = 1.25 # i = 0 # while i < 14: # j = 0 # while j < 25: # if Datatwo[i][j][1] == 1.0 and Data[i][j][0] == distance: # AngularerrorC2[0][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # print "i: ", i," j: ", j # if Data[i][j][1] == 1.25 and Data[i][j][0] == distance: # print Data[i][j][7] # AngularerrorC2[1][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.5 and Data[i][j][0] == distance: # AngularerrorC2[2][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.75 and Data[i][j][0] == distance: # AngularerrorC2[3][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 2.0 and Data[i][j][0] == distance: # AngularerrorC2[4][i] = Data[i][j][7] # j = 25 # else: # j += 1 # i += 1 # print "AngularerrorC2: ", AngularerrorC2[0] # print "AngularerrorC2: ", AngularerrorC2[1] # print "AngularerrorC2: ", AngularerrorC2[2] # print "AngularerrorC2: ", AngularerrorC2[3] # print "AngularerrorC2: ", AngularerrorC2[4] # meanC2D1 = np.mean(AngularerrorC2[0]) # meanC2D2 = np.mean(AngularerrorC2[1]) # meanC2D3 = np.mean(AngularerrorC2[2]) # meanC2D4 = np.mean(AngularerrorC2[3]) # meanC2D5 = np.mean(AngularerrorC2[4]) # stdC2D1 = np.std(AngularerrorC2[0]) # stdC2D2 = np.std(AngularerrorC2[1]) # stdC2D3 = np.std(AngularerrorC2[2]) # stdC2D4 = np.std(AngularerrorC2[3]) # stdC2D5 = np.std(AngularerrorC2[4]) # # meanC2 = [meanC2D1,meanC2D2,meanC2D3,meanC2D4,meanC2D5] # stdC2 = [stdC2D1,stdC2D2,stdC2D3,stdC2D4,stdC2D5] ## C3 # distance = 1.5 # i = 0 # while i < 14: # j = 0 # while j < 25: # if Data[i][j][1] == 1.0 and Data[i][j][0] == distance: # AngularerrorC3[0][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # print "i: ", i," j: ", j # if Data[i][j][1] == 1.25 and Data[i][j][0] == distance: # print Data[i][j][7] # AngularerrorC3[1][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.5 and Data[i][j][0] == distance: # AngularerrorC3[2][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.75 and Data[i][j][0] == distance: # AngularerrorC3[3][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 2.0 and Data[i][j][0] == distance: # AngularerrorC3[4][i] = Data[i][j][7] # j = 25 # else: # j += 1 # i += 1 # print "AngularerrorC3: ", AngularerrorC3[0] # print "AngularerrorC3: ", AngularerrorC3[1] # print "AngularerrorC3: ", AngularerrorC3[2] # print "AngularerrorC3: ", AngularerrorC3[3] # print "AngularerrorC3: ", AngularerrorC3[4] # meanC3D1 = np.mean(AngularerrorC3[0]) # meanC3D2 = np.mean(AngularerrorC3[1]) # meanC3D3 = np.mean(AngularerrorC3[2]) # meanC3D4 = np.mean(AngularerrorC3[3]) # meanC3D5 = np.mean(AngularerrorC3[4]) # stdC3D1 = np.std(AngularerrorC3[0]) # stdC3D2 = np.std(AngularerrorC3[1]) # stdC3D3 = np.std(AngularerrorC3[2]) # stdC3D4 = np.std(AngularerrorC3[3]) # stdC3D5 = np.std(AngularerrorC3[4]) # # meanC3 = [meanC3D1,meanC3D2,meanC3D3,meanC3D4,meanC3D5] # stdC3 = [stdC3D1,stdC3D2,stdC3D3,stdC3D4,stdC3D5] ## C4 # distance = 1.75 # i = 0 # while i < 14: # j = 0 # while j < 25: # if Data[i][j][1] == 1.0 and Data[i][j][0] == distance: # AngularerrorC4[0][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # print "i: ", i," j: ", j # if Data[i][j][1] == 1.25 and Data[i][j][0] == distance: # print Data[i][j][7] # AngularerrorC4[1][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.5 and Data[i][j][0] == distance: # AngularerrorC4[2][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.75 and Data[i][j][0] == distance: # AngularerrorC4[3][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 2.0 and Data[i][j][0] == distance: # AngularerrorC4[4][i] = Data[i][j][7] # j = 25 # else: # j += 1 # i += 1 # print "AngularerrorC4: ", AngularerrorC4[0] # print "AngularerrorC4: ", AngularerrorC4[1] # print "AngularerrorC4: ", AngularerrorC4[2] # print "AngularerrorC4: ", AngularerrorC4[3] # print "AngularerrorC4: ", AngularerrorC4[4] # meanC4D1 = np.mean(AngularerrorC4[0]) # meanC4D2 = np.mean(AngularerrorC4[1]) # meanC4D3 = np.mean(AngularerrorC4[2]) # meanC4D4 = np.mean(AngularerrorC4[3]) # meanC4D5 = np.mean(AngularerrorC4[4]) # stdC4D1 = np.std(AngularerrorC4[0]) # stdC4D2 = np.std(AngularerrorC4[1]) # stdC4D3 = np.std(AngularerrorC4[2]) # stdC4D4 = np.std(AngularerrorC4[3]) # stdC4D5 = np.std(AngularerrorC4[4]) # # meanC4 = [meanC4D1,meanC4D2,meanC4D3,meanC4D4,meanC4D5] # stdC4 = [stdC4D1,stdC4D2,stdC4D3,stdC4D4,stdC4D5] ## C5 # distance = 2.0 # i = 0 # while i < 14: # j = 0 # while j < 25: # if Data[i][j][1] == 1.0 and Data[i][j][0] == distance: # AngularerrorC5[0][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # print "i: ", i," j: ", j # if Data[i][j][1] == 1.25 and Data[i][j][0] == distance: # print Data[i][j][7] # AngularerrorC5[1][i] = Data[i][j][7] # break # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.5 and Data[i][j][0] == distance: # AngularerrorC5[2][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 1.75 and Data[i][j][0] == distance: # AngularerrorC5[3][i] = Data[i][j][7] # j = 25 # else: # j += 1 # j = 0 # while j < 25: # if Data[i][j][1] == 2.0 and Data[i][j][0] == distance: # AngularerrorC5[4][i] = Data[i][j][7] # j = 25 # else: # j += 1 # i += 1 # print "AngularerrorC5: ", AngularerrorC5[0] # print "AngularerrorC5: ", AngularerrorC5[1] # print "AngularerrorC5: ", AngularerrorC5[2] # print "AngularerrorC5: ", AngularerrorC5[3] # print "AngularerrorC5: ", AngularerrorC5[4] # meanC5D1 = np.mean(AngularerrorC5[0]) # meanC5D2 = np.mean(AngularerrorC5[1]) # meanC5D3 = np.mean(AngularerrorC5[2]) # meanC5D4 = np.mean(AngularerrorC5[3]) # meanC5D5 = np.mean(AngularerrorC5[4]) # stdC5D1 = np.std(AngularerrorC5[0]) # stdC5D2 = np.std(AngularerrorC5[1]) # stdC5D3 = np.std(AngularerrorC5[2]) # stdC5D4 = np.std(AngularerrorC5[3]) # stdC5D5 = np.std(AngularerrorC5[4]) # # meanC5 = [meanC5D1,meanC5D2,meanC5D3,meanC5D4,meanC5D5] # stdC5 = [stdC5D1,stdC5D2,stdC5D3,stdC5D4,stdC5D5] N = 5 ind = np.asarray([0.25,1.25,2.25,3.25,4.25]) width = 0.5 # the width of the bars # x1 = [0.275,1.275,2.275,3.275,4.275] # x2 = [0.325,1.325,2.325,3.325,4.325] x1 = [0.375,1.375,2.375,3.375,4.375] x2 = [0.425,1.425,2.425,3.425,4.425] x3 = [0.475,1.475,2.475,3.475,4.475] x4 = [0.525,1.525,2.525,3.525,4.525] x5 = [0.575,1.575,2.575,3.575,4.575] x6 = [0.625,1.625,2.625,3.625,4.625] # x9 = [0.675,1.675,2.675,3.675,4.675] # x10 = [0.725,1.725,2.725,3.725,4.725] # x1 = [0.4,1.4,2.4,3.4,4.4] # x2 = [0.45,1.45,2.45,3.45,4.45] # x3 = [0.5,1.5,2.5,3.5,4.5] # x4 = [0.55,1.55,2.55,3.55,4.55] # x5 = [0.6,1.6,2.6,3.6,4.6] fig = plt.figure(figsize=(14.0, 10.0)) ax = fig.add_subplot(111) # rects1 = ax.bar(ind, Participantmean,width, color='r',edgecolor='black',)#, hatch='//') rects1 = ax.errorbar(x1, meantwoC1,yerr=[stdtwoC1,stdtwoC1],fmt='o',color='blue',ecolor='blue',lw=3, capsize=5, capthick=2) plt.plot(x1, meantwoC1, marker="o", linestyle='-',lw=3,color='blue',label = r'2D-to-2D Calibration Depth 1 + 2 + 3') # rects2 =ax.errorbar(x2, meantwoC2,yerr=[stdtwoC2,stdtwoC2],fmt='o',color='red',ecolor='red',lw=3, capsize=5, capthick=2) # plt.plot(x2, meantwoC2, marker="o", linestyle='-',lw=3,color='red') # # rects3 = ax.errorbar(x3, meantwoC3,yerr=[stdtwoC3,stdtwoC3],fmt='o',color='black',ecolor='black',lw=3, capsize=5, capthick=2) # plt.plot(x3, meantwoC3, marker="o", linestyle='-',lw=3,color='black') # rects4 =ax.errorbar(x4, meantwoC4,yerr=[stdtwoC4,stdtwoC4],fmt='o',color='green',ecolor='green',lw=3, capsize=5, capthick=2) # plt.plot(x4, meantwoC4, marker="o", linestyle='-',lw=3,color='green') # rects5 =ax.errorbar(x5, meantwoC5,yerr=[stdtwoC5,stdtwoC5],fmt='o',color='orange',ecolor='orange',lw=3, capsize=5, capthick=2) # plt.plot(x5, meantwoC5, marker="o", linestyle='-',lw=3,color='orange') # # rects6 =ax.errorbar(x6, meantwoC6,yerr=[stdtwoC6,stdtwoC6],fmt='o',color='cyan',ecolor='cyan',lw=3, capsize=5, capthick=2) # plt.plot(x6, meantwoC6, marker="o", linestyle='-',lw=3,color='cyan') rects3 =ax.errorbar(x3, meantwoC7,yerr=[stdtwoC7,stdtwoC7],fmt='o',color='red',ecolor='red',lw=3, capsize=5, capthick=2) plt.plot(x3, meantwoC7, marker="o", linestyle='-',lw=3,color='red',label = r'2D-to-2D Calibration Depth 2 + 3 + 4') # # rects8 =ax.errorbar(x8, meantwoC8,yerr=[stdtwoC8,stdtwoC8],fmt='o',color='darkviolet',ecolor='darkviolet',lw=3, capsize=5, capthick=2) # plt.plot(x8, meantwoC8, marker="o", linestyle='-',lw=3,color='darkviolet') # # rects9 =ax.errorbar(x9, meantwoC9,yerr=[stdtwoC9,stdtwoC9],fmt='o',color='lime',ecolor='lime',lw=3, capsize=5, capthick=2) # plt.plot(x9, meantwoC9, marker="o", linestyle='-',lw=3,color='lime') rects5 =ax.errorbar(x5, meantwoC10,yerr=[stdtwoC10,stdtwoC10],fmt='o',color='orange',ecolor='orange',lw=3, capsize=5, capthick=2) plt.plot(x5, meantwoC10, marker="o", linestyle='-',lw=3,color='orange',label = r'2D-to-2D Calibration Depth 3 + 4 + 5') # rects1 = ax.bar(ind, Participantmean,width, color='r',edgecolor='black',)#, hatch='//') rects2 = ax.errorbar(x2, meanC1,yerr=[stdC1,stdC1],fmt='o',color='blue',ecolor='blue',lw=3, capsize=5, capthick=2) plt.plot(x2, meanC1, marker="o", linestyle='--',lw=3,color='blue',label = r'2D-to-3D Calibration Depth 1 + 2 + 3',) # rects2 =ax.errorbar(x2, meanC2,yerr=[stdC2,stdC2],fmt='o',color='red',ecolor='red',lw=3, capsize=5, capthick=2) # plt.plot(x2, meanC2, marker="o", linestyle='-',lw=3,color='red') # # rects3 = ax.errorbar(x3, meanC3,yerr=[stdC3,stdC3],fmt='o',color='black',ecolor='black',lw=3, capsize=5, capthick=2) # plt.plot(x3, meanC3, marker="o", linestyle='-',lw=3,color='black') # rects4 =ax.errorbar(x4, meanC4,yerr=[stdC4,stdC4],fmt='o',color='green',ecolor='green',lw=3, capsize=5, capthick=2) # plt.plot(x4, meanC4, marker="o", linestyle='-',lw=3,color='green') # rects5 =ax.errorbar(x5, meanC5,yerr=[stdC5,stdC5],fmt='o',color='orange',ecolor='orange',lw=3, capsize=5, capthick=2) # plt.plot(x5, meanC5, marker="o", linestyle='-',lw=3,color='orange') # # rects6 =ax.errorbar(x6, meanC6,yerr=[stdC6,stdC6],fmt='o',color='cyan',ecolor='cyan',lw=3, capsize=5, capthick=2) # plt.plot(x6, meanC6, marker="o", linestyle='-',lw=3,color='cyan') rects4 =ax.errorbar(x4, meanC7,yerr=[stdC7,stdC7],fmt='o',color='red',ecolor='red',lw=3, capsize=5, capthick=2) plt.plot(x4, meanC7, marker="o", linestyle='--',lw=3,color='red',label = r'2D-to-3D Calibration Depth 2 + 3 + 4') # # rects8 =ax.errorbar(x8, meanC8,yerr=[stdC8,stdC8],fmt='o',color='darkviolet',ecolor='darkviolet',lw=3, capsize=5, capthick=2) # plt.plot(x8, meanC8, marker="o", linestyle='-',lw=3,color='darkviolet') # # rects9 =ax.errorbar(x9, meanC9,yerr=[stdC9,stdC9],fmt='o',color='lime',ecolor='lime',lw=3, capsize=5, capthick=2) # plt.plot(x9, meanC9, marker="o", linestyle='-',lw=3,color='lime') rects6 =ax.errorbar(x6, meanC10,yerr=[stdC10,stdC10],fmt='o',color='orange',ecolor='orange',lw=3, capsize=5, capthick=2) plt.plot(x6, meanC10, marker="o", linestyle='--',lw=3,color='orange',label = r'2D-to-3D Calibration Depth 3 + 4 + 5') ax.set_ylabel(r'Angular Error',fontsize=22) ax.set_xlabel(r'Depth',fontsize=22) ax.set_xticks(ind+0.25) ax.set_xticklabels( ('D1', 'D2', 'D3','D4', 'D5') ,fontsize=16) TOPICs = [0.0,0.5,1.5,2.5,3.5,4.5,5.0]#,110]#,120] print TOPICs LABELs = ["",r'D1 - 1m',r'D2 - 1.25m', r'D3 - 1.5m', r'D4 - 1.75m', r'D5 - 2.0m', ""]#, ""]#, ""] # fig.canvas.set_window_title('Distance Error Correlation') plt.xticks(TOPICs, LABELs,fontsize=18) # legend1 = legend(fontsize=20,loc='best') # legend([rects1,rects2,rects3,rects4,rects5,rects6], [r'\LARGE\textbf{2C-to-2D Calibration Depth 1 + 2 + 3}', r'\LARGE\textbf{2C-to-3D Calibration Depth 1 + 2 + 3}', r'\LARGE\textbf{2C-to-2D Calibration Depth 2 + 3 + 4}', r'\LARGE\textbf{2C-to-3D Calibration Depth 2 + 3 + 4}',r'\LARGE\textbf{2C-to-2D Calibration Depth 3 + 4 + 5}',r'\LARGE\textbf{2C-to-3D Calibration Depth 3 + 4 + 5}'], loc='upper right') # ax2 = plt.gca().add_artist(legend1) ## # plt. legend([rects2,rects4,rects6], [r'\LARGE\textbf{2C-to-3D Calibration Depth 1 + 2 + 3}', r'\LARGE\textbf{2C-to-3D Calibration Depth 2 + 3 + 4}',r'\LARGE\textbf{2C-to-3D Calibration Depth 3 + 4 + 5}'], loc='upper right') TOPICS = [-0.5, 0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0]#,110]#,120] print TOPICS LABELS = [ r'',r'0',r'0.5',r'1', r'1.5', r'2', r'2.5', r'3', r'3.5', r'4', r'4.5', r'5', r'5.5', r'6', r'6.5', r'7', r'7.5', r'8', r'8.5', ""]#, ""]#, ""] # fig.canvas.set_window_title('Accuracy - Activity Statistics') plt.yticks(TOPICS, LABELS,fontsize=18) def autolabel(rects): # attach some text labels for rect in rects: height = rect.get_height() ax.text(0.26+rect.get_x()+rect.get_width()/2., height +0.35, "%.2f"%float(height), ha='center', va='bottom',fontweight='bold',fontsize=13.5) # autolabel(rects1) left = 0.1 # the left side of the subplots of the figure right = 0.975 # the right side of the subplots of the figure bottom = 0.075 # the bottom of the subplots of the figure top = 0.925 # the top of the subplots of the figure wspace = 0.2 # the amount of width reserved for blank space between subplots hspace = 0.4 # the amount of height reserved for white space between subplots plt.subplots_adjust(left=left, bottom=bottom, right=right, top=top, wspace=wspace, hspace=hspace) plt.show() means = [meanC1, meanC2, meanC3, meanC4, meanC5, meanC6, meanC7, meanC8, meanC9,meanC10] print meanC1 print meanC2 print meanC3 print meanC4 print meanC5 fixationinfos_list_path = "MeansC3D2D3.npy" fixationinfos_list_csv_path = "MeansC3D2D3.csv" np.save(fixationinfos_list_path,np.asarray(means)) np.savetxt(fixationinfos_list_csv_path,np.asarray(means), delimiter=",", fmt="%f") if __name__ == "__main__": main(sys.argv[1:])