Permalink
Browse files

minor bug corrected in images

  • Loading branch information...
1 parent 3ec266d commit fae5b672063dc42003378fdcc6ad8b7f1c6ebe16 @bahniks committed Mar 12, 2015
Showing with 14 additions and 12 deletions.
  1. +1 −0 .gitignore
  2. +3 −5 Stuff/Modules/cm.py
  3. +10 −7 Stuff/Modules/image.py
View
@@ -5,6 +5,7 @@
*.files
Data
Images
+Logs
# files made by running #
#########################
View
@@ -1045,11 +1045,9 @@ def recognizeStrategy(self, i0, i1, minSpeed, percentSize):
x0, y0 = self.data[i0][self.indices]
x1, y1 = self.data[i1][self.indices]
t0, t1 = self.data[i0][1], self.data[i1][1]
- try:
- speed = (sqrt(((x1 - x0)**2 + (y1 - y0)**2)) / self.trackerResolution) / ((t1 - t0) / 1000)
- except Exception:
- print(self.data[i0])
- print(self.data[i1])
+
+ speed = (sqrt(((x1 - x0)**2 + (y1 - y0)**2)) / self.trackerResolution) / ((t1 - t0) / 1000)
+
if speed > minSpeed:
border = self.radius * (1 - (percentSize / 100))
cx, cy = self.centerX, self.centerY
View
@@ -117,11 +117,14 @@ def okFun(self):
elif option[1][2] != "str":
value = eval(value)
else:
- value.replace('"', "'")
- if not value.endswith("'"):
- value += "'"
- if not value.startswith("'"):
- value = "'" + value
+ if not value:
+ value = ""
+ else:
+ value.replace('"', "'")
+ if not value.endswith("'"):
+ value += "'"
+ if not value.startswith("'"):
+ value = "'" + value
optionWrite(option[1][0], value)
self.destroy()
@@ -199,9 +202,9 @@ def addComponents(self):
self.components.append("xticks")
if self.yticks and "graph" in self.components:
self.components.append("yticks")
- if self.xlab and "graph" in self.components:
+ if self.xlab.strip() and "graph" in self.components:
self.components.append("xlab")
- if self.ylab and "graph" in self.components:
+ if self.ylab.strip() and "graph" in self.components:
self.components.append("ylab")

0 comments on commit fae5b67

Please sign in to comment.