changeset 514:1ba618fb0f70

corrected bug from merging and argument issue in display-trajectories
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 05 Jun 2014 17:50:42 -0400
parents dbf4b83afbb9
children 727e3c529519
files python/storage.py scripts/display-trajectories.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/python/storage.py	Wed Jun 04 10:57:09 2014 -0400
+++ b/python/storage.py	Thu Jun 05 17:50:42 2014 -0400
@@ -385,13 +385,13 @@
     return dataStrings
 
 def writeList(filename, l):
-    f = utils.openCheck(filename, 'w')
+    f = openCheck(filename, 'w')
     for x in l:
         f.write('{}\n'.format(x))
     f.close()
 
 def loadListStrings(filename, commentChar = commentChar):
-    f = utils.openCheck(filename, 'r')
+    f = openCheck(filename, 'r')
     result = getLines(f, commentChar)
     f.close()
     return result
@@ -424,7 +424,7 @@
     and returns the list of Feature objects'''
     objects = []
 
-    input = utils.openCheck(filename)
+    input = openCheck(filename)
     if not input:
         import sys
         sys.exit()
@@ -489,9 +489,9 @@
     '''Reads data from the trajectory data provided by NGSIM project
     and converts to our current format.'''
     if append:
-        out = utils.openCheck(outFile,'a')
+        out = openCheck(outFile,'a')
     else:
-        out = utils.openCheck(outFile,'w')
+        out = openCheck(outFile,'w')
     nObjectsPerType = [0,0,0]
 
     features = loadNgsimFile(inFile, sequenceNum)
@@ -516,7 +516,7 @@
         f.write(s+'\n')
 
 def writeTrajectoriesToCsv(filename, objects):
-    f = utils.openCheck(filename, 'w')
+    f = openCheck(filename, 'w')
     for i,obj in enumerate(objects):
         writePositionsToCsv(f, obj)
     f.close()
--- a/scripts/display-trajectories.py	Wed Jun 04 10:57:09 2014 -0400
+++ b/scripts/display-trajectories.py	Thu Jun 05 17:50:42 2014 -0400
@@ -55,7 +55,7 @@
     distortionCoefficients = args.distortionCoefficients
 if not args.configFilename and args.undistortedImageMultiplication != None:
     undistortedImageMultiplication = args.undistortedImageMultiplication
-if not args.configFilename and args.firstFrameNum != None:
+if args.firstFrameNum != None:
     firstFrameNum = args.firstFrameNum