fixed bug in output of origin (reported size instead)
This commit is contained in:
parent
fafa69b846
commit
f75604c235
processing/pre
|
@ -5,6 +5,9 @@ import os,sys,string,re,math,numpy
|
|||
import damask
|
||||
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
class extendedOption(Option):
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
@ -46,7 +49,7 @@ mappings = {
|
|||
|
||||
parser = OptionParser(option_class=extendedOption, usage='%prog options [file[s]]', description = """
|
||||
Changes the (three-dimensional) canvas of a spectral geometry description.
|
||||
""" + string.replace('$Id$','\n','\\n')
|
||||
""" + string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
|
||||
parser.add_option('-g', '--grid', dest='grid', type='string', nargs = 3, \
|
||||
|
@ -81,7 +84,8 @@ else:
|
|||
|
||||
#--- loop over input files ------------------------------------------------------------------------
|
||||
for file in files:
|
||||
if file['name'] != 'STDIN': file['croak'].write(file['name']+'\n')
|
||||
if file['name'] != 'STDIN': file['croak'].write('\033[1m'+scriptName+'\033[0m: '+file['name']+'\n')
|
||||
else: file['croak'].write('\033[1m'+scriptName+'\033[0m\n')
|
||||
|
||||
theTable = damask.ASCIItable(file['input'],file['output'],labels=False)
|
||||
theTable.head_read()
|
||||
|
@ -180,7 +184,7 @@ for file in files:
|
|||
if (any(newInfo['size'] != info['size'])):
|
||||
file['croak'].write('--> size x y z: %s\n'%(' x '.join(map(str,newInfo['size']))))
|
||||
if (any(newInfo['origin'] != info['origin'])):
|
||||
file['croak'].write('--> origin x y z: %s\n'%(' : '.join(map(str,newInfo['size']))))
|
||||
file['croak'].write('--> origin x y z: %s\n'%(' : '.join(map(str,newInfo['origin']))))
|
||||
if (newInfo['microstructures'] != info['microstructures']):
|
||||
file['croak'].write('--> microstructures: %i\n'%newInfo['microstructures'])
|
||||
|
||||
|
@ -195,7 +199,7 @@ for file in files:
|
|||
theTable.labels_clear()
|
||||
theTable.info_clear()
|
||||
theTable.info_append(extra_header+[
|
||||
"$Id$",
|
||||
scriptID,
|
||||
"grid\ta %i\tb %i\tc %i"%(newInfo['grid'][0],newInfo['grid'][1],newInfo['grid'][2],),
|
||||
"size\tx %f\ty %f\tz %f"%(newInfo['size'][0],newInfo['size'][1],newInfo['size'][2],),
|
||||
"origin\tx %f\ty %f\tz %f"%(newInfo['origin'][0],newInfo['origin'][1],newInfo['origin'][2],),
|
||||
|
|
Loading…
Reference in New Issue