added specifics to resulting column label (sum or prod)
This commit is contained in:
parent
76236a4a0c
commit
f8ffd7e39c
|
@ -56,6 +56,7 @@ for name in filenames:
|
||||||
remarks = []
|
remarks = []
|
||||||
columns = []
|
columns = []
|
||||||
dims = []
|
dims = []
|
||||||
|
how = 'prod' if options.product else 'sum'
|
||||||
|
|
||||||
for what in options.label:
|
for what in options.label:
|
||||||
dim = table.label_dimension(what)
|
dim = table.label_dimension(what)
|
||||||
|
@ -63,8 +64,8 @@ for name in filenames:
|
||||||
else:
|
else:
|
||||||
dims.append(dim)
|
dims.append(dim)
|
||||||
columns.append(table.label_index(what))
|
columns.append(table.label_index(what))
|
||||||
table.labels_append('cum({})'.format(what) if dim == 1 else
|
table.labels_append('cum_{}({})'.format(how,what) if dim == 1 else
|
||||||
['{}_cum({})'.format(i+1,what) for i in range(dim)] ) # extend ASCII header with new labels
|
['{}_cum_{}({})'.format(i+1,how,what) for i in range(dim)] ) # extend ASCII header with new labels
|
||||||
|
|
||||||
if remarks != []: damask.util.croak(remarks)
|
if remarks != []: damask.util.croak(remarks)
|
||||||
if errors != []:
|
if errors != []:
|
||||||
|
|
Loading…
Reference in New Issue