nicer code layout

This commit is contained in:
Philip Eisenlohr 2017-01-19 15:10:38 +01:00
parent c80b02dd72
commit 746cb9c306
1 changed files with 7 additions and 9 deletions

View File

@ -89,15 +89,13 @@ if options.weight is not None: labels += [options.weight]
if filenames == []: filenames = [None] if filenames == []: filenames = [None]
for name in filenames: for name in filenames:
try: try: table = damask.ASCIItable(name = name,
table = damask.ASCIItable(name = name, outname = os.path.join(os.path.dirname(name),
outname = os.path.join(os.path.dirname(name), 'binned-{}-{}_'.format(*options.data) +
'binned-{}-{}_'.format(*options.data)+ \ ('weighted-{}_'.format(options.weight) if options.weight else '') +
('weighted-{}_'.format(options.weight) if options.weight else '') + \ os.path.basename(name)) if name else name,
os.path.basename(name)) if name else name, buffered = False)
buffered = False) except: continue
except:
continue
damask.util.report(scriptName,name) damask.util.report(scriptName,name)
# ------------------------------------------ read header ------------------------------------------ # ------------------------------------------ read header ------------------------------------------