(hooke_cli.py) added _clickize method to ease ClickPoint conversion
authordevicerandom <devnull@localhost>
Mon, 27 Oct 2008 15:36:56 +0000 (15:36 +0000)
committerdevicerandom <devnull@localhost>
Mon, 27 Oct 2008 15:36:56 +0000 (15:36 +0000)
hooke.conf
hooke_cli.py

index 27869ad01bf508304be49496339d25e0cd5b3e4e..d49d3606eed1d7c738514efc15a641fa4e94333c 100755 (executable)
@@ -33,6 +33,7 @@ This section defines which plugins have to be loaded by Hooke.
     <viewer/>
     <!-- tutorial/ -->
     <macro/>
+    <autopeak/>
 </plugins>
 
 <!--
index d26c47ea29750be45cfc08d5c08ead7cb1afdd69..a822042a4b0de5b522e0cccfdf3888af491b78b3 100755 (executable)
@@ -167,6 +167,16 @@ class HookeCli(cmd.Cmd):
         '''
         return self.plotmanip[self.config['plotmanips'].index(name)]
     
+    def _clickize(self, xvector, yvector, index):
+        '''
+        returns a ClickedPoint() object from an index and vectors of x, y coordinates       
+        '''
+        point=ClickedPoint()
+        point.index=index
+        point.absolute_coords=xvector[index],yvector[index]
+        point.find_graph_coords(xvector,yvector)
+        return point
+    
 #HERE COMMANDS BEGIN
     
     def help_set(self):