From: devicerandom Date: Mon, 9 Mar 2009 19:37:43 +0000 (+0000) Subject: (pcluster.py) again, dirty stuff for testing X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7219550c7847f0a5ef4723a4c55a47c9f7f44ace;p=hooke.git (pcluster.py) again, dirty stuff for testing --- diff --git a/libhooke.py b/libhooke.py index a1f0681..ed5c088 100755 --- a/libhooke.py +++ b/libhooke.py @@ -269,6 +269,7 @@ class ClickedPoint: ''' 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! diff --git a/pca_config.txt b/pca_config.txt index 4a26584..9565756 100644 --- a/pca_config.txt +++ b/pca_config.txt @@ -1,17 +1,17 @@ -row[1]*15, row[3], row[6], row[7], row[8], row[9]*1, row[10], row[11] - -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 +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 diff --git a/pcluster.py b/pcluster.py index 530104d..4a14a9a 100644 --- a/pcluster.py +++ b/pcluster.py @@ -373,6 +373,11 @@ class pclusterCommands: # plotting X=myArrayTr[0] Y=myArrayTr[1] + + X=list(X) + Y=list(Y) + + clustplot=lhc.PlotObject() #FIXME @@ -386,8 +391,15 @@ class pclusterCommands: 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]: @@ -396,10 +408,20 @@ class pclusterCommands: 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']