simplified data column determination.
This commit is contained in:
parent
06f017effa
commit
ee65b269ad
|
@ -99,17 +99,16 @@ for name in filenames:
|
||||||
|
|
||||||
# --------------- figure out column to process -----------------------------------------------------
|
# --------------- figure out column to process -----------------------------------------------------
|
||||||
|
|
||||||
column = None
|
column = table.labels_index([options.label])
|
||||||
if options.label != None:
|
|
||||||
if options.label in table.labels:
|
if np.any(np.array(column) == -1):
|
||||||
column = table.labels.index(options.label) # remember columns of requested data
|
file['croak'].write('column %s not found...\n'%options.label)
|
||||||
else:
|
table.close(dismiss = True) # close ASCIItable and remove empty file
|
||||||
file['croak'].write('column %s not found...\n'%options.label)
|
continue
|
||||||
continue
|
|
||||||
|
|
||||||
# ------------------------------------------ process data ------------------------------------------
|
# ------------------------------------------ process data ------------------------------------------
|
||||||
|
|
||||||
table.data_readArray([column] if column != None else [])
|
table.data_readArray(column)
|
||||||
|
|
||||||
# convert data to values between 0 and 1 and arrange according to given options
|
# convert data to values between 0 and 1 and arrange according to given options
|
||||||
if options.dimension != []: table.data = table.data.reshape(options.dimension[1],options.dimension[0])
|
if options.dimension != []: table.data = table.data.reshape(options.dimension[1],options.dimension[0])
|
||||||
|
|
Loading…
Reference in New Issue