Ran update_copyright.py
[hooke.git] / hooke / ui / gui / clickedpoint.py
index 377ff2aa72fcdd701fb3febd142522dfc86023a7..35c244cfe33edffe237b19cf9befafd2ec775223 100644 (file)
@@ -1,38 +1,38 @@
-#!/usr/bin/env python\r
-\r
-'''\r
-clickedpoint.py\r
-\r
-ClickedPoint class for Hooke.\r
-\r
-Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)\r
-\r
-This program is released under the GNU General Public License version 2.\r
-'''\r
-\r
-from scipy import arange\r
-\r
-class ClickedPoint(object):\r
-    '''\r
-    This class defines what a clicked point on the curve plot is.\r
-    '''\r
-    def __init__(self):\r
-\r
-        self.is_marker = None #boolean ; decides if it is a marker\r
-        self.is_line_edge = None #boolean ; decides if it is the edge of a line (unused)\r
-        self.absolute_coords = (None, None) #(float,float) ; the absolute coordinates of the clicked point on the graph\r
-        self.graph_coords = (None, None) #(float,float) ; the coordinates of the plot that are nearest in X to the clicked point\r
-        self.index = None #integer ; the index of the clicked point with respect to the vector selected\r
-        self.dest = None #0 or 1 ; 0=top plot 1=bottom plot\r
-\r
-    def find_graph_coords(self, xvector, yvector):\r
-        '''\r
-        Given a clicked point on the plot, finds the nearest point in the dataset (in X) that\r
-        corresponds to the clicked point.\r
-        '''\r
-        dists = []\r
-        for index in arange(1, len(xvector), 1):\r
-            dists.append(((self.absolute_coords[0] - xvector[index]) ** 2)+((self.absolute_coords[1] - yvector[index]) ** 2))\r
-\r
-        self.index=dists.index(min(dists))\r
-        self.graph_coords=(xvector[self.index], yvector[self.index])\r
+#!/usr/bin/env python
+
+'''
+clickedpoint.py
+
+ClickedPoint class for Hooke.
+
+Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)
+
+This program is released under the GNU General Public License version 2.
+'''
+
+from scipy import arange
+
+class ClickedPoint(object):
+    '''
+    This class defines what a clicked point on the curve plot is.
+    '''
+    def __init__(self):
+
+        self.is_marker = None #boolean ; decides if it is a marker
+        self.is_line_edge = None #boolean ; decides if it is the edge of a line (unused)
+        self.absolute_coords = (None, None) #(float,float) ; the absolute coordinates of the clicked point on the graph
+        self.graph_coords = (None, None) #(float,float) ; the coordinates of the plot that are nearest in X to the clicked point
+        self.index = None #integer ; the index of the clicked point with respect to the vector selected
+        self.dest = None #0 or 1 ; 0=top plot 1=bottom plot
+
+    def find_graph_coords(self, xvector, yvector):
+        '''
+        Given a clicked point on the plot, finds the nearest point in the dataset (in X) that
+        corresponds to the clicked point.
+        '''
+        dists = []
+        for index in arange(1, len(xvector), 1):
+            dists.append(((self.absolute_coords[0] - xvector[index]) ** 2)+((self.absolute_coords[1] - yvector[index]) ** 2))
+
+        self.index=dists.index(min(dists))
+        self.graph_coords=(xvector[self.index], yvector[self.index])