only grain file type 1 seems to make sense (type 2 has average values).
For type one, data is fixed i.e. flexible labels are not useful
This commit is contained in:
parent
fb8a464674
commit
5951b45259
|
@ -13,23 +13,13 @@ scriptID = ' '.join([scriptName,damask.version])
|
|||
#--------------------------------------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog [file[s]]', description = """
|
||||
Adds header to OIM grain file to make it accesible as ASCII table
|
||||
Adds header to OIM grain file type 1 to make it accesible as ASCII table
|
||||
|
||||
""", version = scriptID)
|
||||
|
||||
defaults = {'labels':['1_euler','2_euler','3_euler','1_pos','2_pos','IQ','CI','Fit','GrainID']}
|
||||
|
||||
parser.add_option('-l', '--labels',
|
||||
dest = 'labels',
|
||||
action = 'extend', metavar = '<string LIST>',
|
||||
help = 'lables of requested columns [{}]'.format(defaults['labels']))
|
||||
|
||||
|
||||
(options, filenames) = parser.parse_args()
|
||||
|
||||
if options.labels is None:
|
||||
options.labels = defaults['labels']
|
||||
|
||||
# --- loop over input files -------------------------------------------------------------------------
|
||||
|
||||
if filenames == []: filenames = [None]
|
||||
|
@ -44,10 +34,10 @@ for name in filenames:
|
|||
table.head_read()
|
||||
data = []
|
||||
while table.data_read():
|
||||
data.append(table.data[0:len(options.labels)])
|
||||
data.append(table.data[0:9])
|
||||
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.labels_append(options.labels)
|
||||
table.labels_append(['1_euler','2_euler','3_euler','1_pos','2_pos','IQ','CI','Fit','GrainID'])
|
||||
table.head_write()
|
||||
for i in data:
|
||||
table.data = i
|
||||
|
|
Loading…
Reference in New Issue