# HG changeset patch # User Nicolas Saunier # Date 1402005042 14400 # Node ID 1ba618fb0f70cd95f3a4481746a402174dfcd201 # Parent dbf4b83afbb941a8baaeec0b383877bb6b6cf1e7 corrected bug from merging and argument issue in display-trajectories diff -r dbf4b83afbb9 -r 1ba618fb0f70 python/storage.py --- 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() diff -r dbf4b83afbb9 -r 1ba618fb0f70 scripts/display-trajectories.py --- 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