added leading zeros to names of microstructures and phases, spaces caused problems during initialization

This commit is contained in:
Martin Diehl 2013-02-20 14:50:01 +00:00
parent dfe34fd162
commit 831ad6d9c8
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ for file in files:
else: # finished with comments block else: # finished with comments block
if options.config: # write configuration (line by line) if options.config: # write configuration (line by line)
point += 1 point += 1
me = str(point).rjust(formatwidth) me = str(point).zfill(formatwidth)
microstructure += ['[Grain%s]\n'%me + \ microstructure += ['[Grain%s]\n'%me + \
'crystallite\t%i\n'%options.crystallite + \ 'crystallite\t%i\n'%options.crystallite + \
'(constituent)\tphase %i\ttexture %s\tfraction 1.0\n'%(options.phase[{True:0,False:1}[float(words[options.column-1])<options.threshold]],me) '(constituent)\tphase %i\ttexture %s\tfraction 1.0\n'%(options.phase[{True:0,False:1}[float(words[options.column-1])<options.threshold]],me)