diff python/storage.py @ 643:bfaa6b95dae2

added function to plot curvilinear position as a function of time
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 10 Apr 2015 15:40:27 +0200
parents 932f96c89212
children 5ed2118c959d
line wrap: on
line diff
--- a/python/storage.py	Fri Apr 10 14:54:05 2015 +0200
+++ b/python/storage.py	Fri Apr 10 15:40:27 2015 +0200
@@ -661,7 +661,6 @@
 
     Assumed to be sorted over time'''
     objects = {} # dictionary of objects index by their id
-    firstInstants = {}
 
     if usePandas:
         from pandas import read_csv
@@ -681,6 +680,7 @@
             objects[objNum].curvilinearPositions = moving.CurvilinearTrajectory(S = round(tmp['POS'].tolist(), nDecimals), Y = round(tmp['POSLAT'].tolist(), nDecimals), lanes = tmp['LANE'].tolist())
         return objects.values()
     else:
+        firstInstants = {}
         inputfile = openCheck(filename, quitting = True)
         # data = pd.read_csv(filename, skiprows=15, delimiter=';')
         # skip header: 15 lines + 1