'''
Given a clicked point on the plot, finds the nearest point in the dataset (in X) that
corresponds to the clicked point.
+ OLD & DEPRECATED - to be removed
'''
#FIXME: a general algorithm using min() is needed!
-row[1]*15, row[3], row[6], row[7], row[8], row[9]*1, row[10], row[11]\r
-\r
-questo file viene letto solo nella prima riga!!\r
-----------------------------------------------------\r
-str(peak_number)+ # non considerato\r
-str(delta_mean)+ # 0\r
-str(delta_median)+ # 1 -\r
-str(force_mean)+ # 2\r
-str(force_median)+ # 3 -\r
-str(first_peak_cl)+ # 4 -\r
-str(last_peak_cl)+ # 5 -\r
-str(max_force)+ # 6\r
-str(min_force)+ # 7\r
-str(max_delta)+ # 8\r
-str(min_delta)+ # 9\r
-str(delta_stdev)+ # 10\r
-str(forces_stdev)+ # 11\r
+row[1]*15, row[3], row[6], row[7], row[8], row[9]*100, row[10]*150, row[11]*10
+
+questo file viene letto solo nella prima riga!!
+----------------------------------------------------
+str(peak_number)+ # non considerato
+str(delta_mean)+ # 0
+str(delta_median)+ # 1 -
+str(force_mean)+ # 2
+str(force_median)+ # 3 -
+str(first_peak_cl)+ # 4 -
+str(last_peak_cl)+ # 5 -
+str(max_force)+ # 6
+str(min_force)+ # 7
+str(max_delta)+ # 8
+str(min_delta)+ # 9
+str(delta_stdev)+ # 10
+str(forces_stdev)+ # 11
# plotting
X=myArrayTr[0]
Y=myArrayTr[1]
+
+ X=list(X)
+ Y=list(Y)
+
+
clustplot=lhc.PlotObject()
#FIXME
Xbad=[]
Ybad=[]
+
+ goodnamefile=open('/home/massimo/python/hooke/dataset_clust/roslin_blind50.log','r')
+ goodnames=goodnamefile.readlines()
+ goodnames=[i.split()[0] for i in goodnames[1:]]
+
+
for index in range(len(self.pca_paths)):
- if 'syn' in self.pca_paths[index] and not 'bad' in self.pca_paths[index]:
+ '''
+ if '3s3' in self.pca_paths[index] and not 'bad' in self.pca_paths[index]:
Xsyn.append(X[index])
Ysyn.append(Y[index])
elif 'bad' in self.pca_paths[index]:
else:
Xgb1.append(X[index])
Ygb1.append(Y[index])
- print 'blath',len(Xbad),len(Ybad)
- clustplot.add_set(Xsyn,Ysyn)
- clustplot.add_set(Xgb1,Ygb1)
+ '''
+ #print self.pca_paths
+ if self.pca_paths[index][:-1] in goodnames:
+ Xsyn.append(X[index])
+ Ysyn.append(Y[index])
+ else:
+ Xbad.append(X[index])
+ Ybad.append(Y[index])
+
+ print 'blath',len(Xsyn),len(Ysyn)
+
+ #clustplot.add_set(Xgb1,Ygb1)
clustplot.add_set(Xbad,Ybad)
+ clustplot.add_set(Xsyn,Ysyn)
clustplot.normalize_vectors()
clustplot.styles=['scatter', 'scatter','scatter']
clustplot.colors=[None,'red','green']