corrected order of output, config file output is not supported yet
This commit is contained in:
parent
78d913c07d
commit
0cec85ac63
|
@ -83,17 +83,16 @@ for file in files:
|
||||||
|
|
||||||
#--- write data -----------------------------------------------------------------------------------
|
#--- write data -----------------------------------------------------------------------------------
|
||||||
header = [' '.join([scriptID] + sys.argv[1:]),
|
header = [' '.join([scriptID] + sys.argv[1:]),
|
||||||
"grid\ta %i\tb %i\tc %i"%(info['grid'][0],info['grid'][1],info['grid'][0]),
|
"grid\ta %i\tb %i\tc %i"%(info['grid'][0],info['grid'][1],info['grid'][2]),
|
||||||
"size\tx %f\ty %f\tz %f"%(info['size'][0],info['size'][1],info['size'][0]),
|
"size\tx %f\ty %f\tz %f"%(info['size'][0],info['size'][1],info['size'][2]),
|
||||||
"origin\tx %f\ty %f\tz %f"%(info['origin'][0],info['origin'][1],info['origin'][2]),
|
"origin\tx %f\ty %f\tz %f"%(info['origin'][0],info['origin'][1],info['origin'][2]),
|
||||||
"microstructures\t%i"%info['microstructures'],
|
"microstructures\t%i"%info['microstructures'],
|
||||||
"homogenization\t%i"%info['homogenization'],
|
"homogenization\t%i"%info['homogenization'],
|
||||||
]
|
]
|
||||||
file['output'].write('\n'.join(['%i\theader'%(len(header))] + header) + '\n')
|
file['output'].write('\n'.join(['%i\theader'%(len(header))] + header) + '\n')
|
||||||
np.savetxt(file['output'],imarray.reshape([info['grid'][0],info['grid'][1]*info['grid'][2]]),fmt='%03d')
|
np.savetxt(file['output'],imarray.reshape([info['grid'][1]*info['grid'][2],info['grid'][0]]),fmt='%03d')
|
||||||
|
|
||||||
#--- output finalization --------------------------------------------------------------------------
|
#--- output finalization --------------------------------------------------------------------------
|
||||||
if file['name'] != 'STDIN':
|
if file['name'] != 'STDIN':
|
||||||
file['output'].close()
|
file['output'].close()
|
||||||
os.rename(file['name']+'_tmp',
|
os.rename(file['name']+'_tmp', os.path.splitext(file['name'])[0] +'.geom')
|
||||||
os.path.splitext(file['name'])[0] +'%s'%('_material.config' if options.config else '.geom'))
|
|
||||||
|
|
Loading…
Reference in New Issue