(pcluster.py) again, dirty stuff for testing
authordevicerandom <devnull@localhost>
Mon, 9 Mar 2009 19:37:43 +0000 (19:37 +0000)
committerdevicerandom <devnull@localhost>
Mon, 9 Mar 2009 19:37:43 +0000 (19:37 +0000)
libhooke.py
pca_config.txt
pcluster.py

index a1f06812cb3b5327484704c2af8a323b3f78bef5..ed5c088a624822a2792ccea53250e042267f24dc 100755 (executable)
@@ -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!
index 4a26584755de5b319d48cc757cfae2d31050c8cf..95657568e1f77da45e105ce6ac2696d98df52753 100644 (file)
@@ -1,17 +1,17 @@
-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
index 530104dec4bfa19170d53fd8c006d7c75397e15c..4a14a9aef0fb49efd269ac4f92dbd47b72ede8b6 100644 (file)
@@ -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']