# HG changeset patch # User Nicolas Saunier # Date 1562617638 14400 # Node ID 6baa915dd8bdb16108687df581aa44c0574f229d # Parent 79c18dde08645238fac1609df7094acb5e09544e added functionalities for TemporalIndicator (for Lionel) diff -r 79c18dde0864 -r 6baa915dd8bd trafficintelligence/indicators.py --- a/trafficintelligence/indicators.py Tue Jul 02 14:55:29 2019 -0400 +++ b/trafficintelligence/indicators.py Mon Jul 08 16:27:18 2019 -0400 @@ -74,8 +74,15 @@ def getName(self): return self.name - def getValues(self): - return [self.__getitem__(t) for t in self.timeInterval] + def getValues(self, withNone = True): + result = [self.__getitem__(t) for t in self.timeInterval] + if withNone: + return result + else: + return [x for x in result if x is not None] + + def getInstants(self): + return list(self.values.keys()) def plot(self, options = '', xfactor = 1., yfactor = 1., timeShift = 0, **kwargs): if self.getTimeInterval().length() == 1: