diff --git a/processing/misc/OIMgrainFile_toTable.py b/processing/misc/OIMgrainFile_toTable.py index a2a8c9d3b..063adb0db 100755 --- a/processing/misc/OIMgrainFile_toTable.py +++ b/processing/misc/OIMgrainFile_toTable.py @@ -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 = '', - 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