From 53a38e3a97a2b61d56c857fe3d3970f34f405745 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Dec 2019 10:37:13 +0100 Subject: [PATCH] polishing --- processing/post/scaleData.py | 6 +++--- processing/post/shiftData.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/processing/post/scaleData.py b/processing/post/scaleData.py index 60ffa41fa..4484c5300 100755 --- a/processing/post/scaleData.py +++ b/processing/post/scaleData.py @@ -22,7 +22,7 @@ Uniformly scale column values by given factor. """, version = scriptID) parser.add_option('-l','--label', - dest = 'label', + dest = 'labels', action = 'extend', metavar = '', help ='column(s) to scale') parser.add_option('-f','--factor', @@ -31,7 +31,7 @@ parser.add_option('-f','--factor', help = 'factor(s) per column') parser.set_defaults(label = [], - ) + factor = []) (options,filenames) = parser.parse_args() if filenames == []: filenames = [None] @@ -43,7 +43,7 @@ for name in filenames: damask.util.report(scriptName,name) table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) - for i,label in enumerate(options.label): + for i,label in enumerate(options.labels): table.set(label, table.get(label)*float(options.factor[i]), scriptID+' '+' '.join(sys.argv[1:])) diff --git a/processing/post/shiftData.py b/processing/post/shiftData.py index 37c72919e..fb2ba48f9 100755 --- a/processing/post/shiftData.py +++ b/processing/post/shiftData.py @@ -22,7 +22,7 @@ Uniformly shift column values by given offset. """, version = scriptID) parser.add_option('-l','--label', - dest = 'label', + dest = 'labels', action = 'extend', metavar = '', help ='column(s) to shift') parser.add_option('-o','--offset', @@ -31,7 +31,7 @@ parser.add_option('-o','--offset', help = 'offset(s) per column') parser.set_defaults(label = [], - ) + offset = []) (options,filenames) = parser.parse_args() if filenames == []: filenames = [None] @@ -43,7 +43,7 @@ for name in filenames: damask.util.report(scriptName,name) table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) - for i,label in enumerate(options.label): + for i,label in enumerate(options.labels): table.set(label, table.get(label)+float(options.offset[i]), scriptID+' '+' '.join(sys.argv[1:]))