From 8f79744f2c490d252d264a7aeb0ada3d4654ddda Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 31 Aug 2015 16:01:11 +0000 Subject: [PATCH] now works with (rounded) floating point numbers as mapping indices --- processing/post/addMapped.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/post/addMapped.py b/processing/post/addMapped.py index 738b8746e..9bdd24285 100755 --- a/processing/post/addMapped.py +++ b/processing/post/addMapped.py @@ -68,7 +68,7 @@ for name in filenames: table = damask.ASCIItable(name = name, buffered = False) except: continue - table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else '')) + table.croak(damask.util.emph(scriptName)+(': '+name if name else '')) # ------------------------------------------ read header ------------------------------------------ @@ -96,7 +96,7 @@ for name in filenames: outputAlive = True while outputAlive and table.data_read(): # read next data line of ASCII table - table.data_append(mappedTable.data[int(table.data[mappedColumn])+options.offset-1]) # add all mapped data types + table.data_append(mappedTable.data[int(round(float(table.data[mappedColumn])))+options.offset-1]) # add all mapped data types outputAlive = table.data_write() # output processed line # ------------------------------------------ output finalization -----------------------------------