diff --git a/processing/post/addCauchy.py b/processing/post/addCauchy.py index 788f1b580..ad29792a6 100755 --- a/processing/post/addCauchy.py +++ b/processing/post/addCauchy.py @@ -35,7 +35,6 @@ parser.set_defaults(defgrad = 'f', ) (options,filenames) = parser.parse_args() - if filenames == []: filenames = [None] for name in filenames: @@ -45,5 +44,6 @@ for name in filenames: table.add_array('Cauchy', damask.mechanics.Cauchy(table.get_array(options.defgrad).reshape(-1,3,3), table.get_array(options.stress).reshape(-1,3,3)).reshape(-1,9), - scriptID) + scriptID+' '+' '.join(sys.argv[1:])) + table.to_ASCII(sys.stdout if name is None else name) diff --git a/processing/post/addDeterminant.py b/processing/post/addDeterminant.py index 090b9224a..e38261bf6 100755 --- a/processing/post/addDeterminant.py +++ b/processing/post/addDeterminant.py @@ -27,14 +27,11 @@ parser.add_option('-t','--tensor', help = 'heading of columns containing tensor field values') (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] if options.tensor is None: parser.error('no data column specified.') -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] - for name in filenames: damask.util.report(scriptName,name) @@ -42,5 +39,6 @@ for name in filenames: for tensor in options.tensor: table.add_array('det({})'.format(tensor), np.linalg.det(table.get_array(tensor).reshape(-1,3,3)), - scriptID) + scriptID+' '+' '.join(sys.argv[1:])) + table.to_ASCII(sys.stdout if name is None else name) diff --git a/processing/post/addDeviator.py b/processing/post/addDeviator.py index c0bb77e6b..7807c7f5d 100755 --- a/processing/post/addDeviator.py +++ b/processing/post/addDeviator.py @@ -30,13 +30,10 @@ parser.add_option('-s','--spherical', help = 'report spherical part of tensor (hydrostatic component, pressure)') (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] if options.tensor is None: - parser.error('no data column specified...') - -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] + parser.error('no data column specified...') for name in filenames: damask.util.report(scriptName,name) @@ -45,9 +42,10 @@ for name in filenames: for tensor in options.tensor: table.add_array('dev({})'.format(tensor), damask.mechanics.deviatoric_part(table.get_array(tensor).reshape(-1,3,3)).reshape((-1,9)), - scriptID) + scriptID+' '+' '.join(sys.argv[1:])) if options.spherical: table.add_array('sph({})'.format(tensor), damask.mechanics.spherical_part(table.get_array(tensor).reshape(-1,3,3)), - scriptID) + scriptID+' '+' '.join(sys.argv[1:])) + table.to_ASCII(sys.stdout if name is None else name)