diff python/indicators.py @ 306:93d851d0d21e

bug correction, minor work on indicators
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 02 Apr 2013 15:27:42 -0400
parents 66691c06928c
children 6c068047edbf
line wrap: on
line diff
--- a/python/indicators.py	Fri Mar 29 21:20:12 2013 -0400
+++ b/python/indicators.py	Tue Apr 02 15:27:42 2013 -0400
@@ -18,7 +18,7 @@
     
     def __init__(self, name, values, timeInterval=None, maxValue = None):
         self.name = name
-        self.isCosine = name.find('Cosine')
+        self.isCosine = (name.find('Cosine') >= 0)
         if timeInterval:
             assert len(values) == timeInterval.length()
             self.timeInterval = timeInterval
@@ -78,7 +78,7 @@
         (no transformation otherwise)'''
         from numpy import arccos
         values = self.getValues()
-        if self.isCosine >= 0:
+        if self.isCosine:
             return [arccos(c) for c in values]
         else: 
             return values