standard-conforming and nice labels

This commit is contained in:
Martin Diehl 2020-03-18 20:49:39 +01:00
parent 4cef31e770
commit c40e607e08
2 changed files with 4 additions and 6 deletions

View File

@ -59,6 +59,6 @@ for name in filenames:
idx = np.reshape(table.get(options.index).astype(int) + options.offset,(-1))-1 idx = np.reshape(table.get(options.index).astype(int) + options.offset,(-1))-1
for data in options.label: for data in options.label:
table.add(data+'addIndexed',indexedTable.get(data)[idx],scriptID+' '+' '.join(sys.argv[1:])) table.add(data+'_addIndexed',indexedTable.get(data)[idx],scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name) table.to_ASCII(sys.stdout if name is None else name)

View File

@ -203,13 +203,11 @@ for name in filenames:
# ------------------------------------------ assemble header --------------------------------------- # ------------------------------------------ assemble header ---------------------------------------
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
table.labels_append(['{id}_' table.labels_append(['S[{direction[0]:.1g}_{direction[1]:.1g}_{direction[2]:.1g}]'
'S[{direction[0]:.1g}_{direction[1]:.1g}_{direction[2]:.1g}]'
'({normal[0]:.1g}_{normal[1]:.1g}_{normal[2]:.1g})'\ '({normal[0]:.1g}_{normal[1]:.1g}_{normal[2]:.1g})'\
.format( id = i+1, .format(normal = theNormal,
normal = theNormal,
direction = theDirection, direction = theDirection,
) for i,(theNormal,theDirection) in enumerate(zip(slip_normal,slip_direction))]) ) for theNormal,theDirection in zip(slip_normal,slip_direction)])
table.head_write() table.head_write()
# ------------------------------------------ process data ------------------------------------------ # ------------------------------------------ process data ------------------------------------------