exchanged "maxGrainCount" for "maxMicrostructure", since this is what it really means...

This commit is contained in:
Philip Eisenlohr 2012-10-30 16:15:10 +00:00
parent ff164c9209
commit f2229883b5
2 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ mappings = {
'dimension': lambda x: float(x),
'origin': lambda x: float(x),
'homogenization': lambda x: int(x),
'maxgraincount': lambda x: int(x),
'maxmicrostructure': lambda x: int(x),
}
@ -80,7 +80,7 @@ for file in files:
'dimension': [0.0,0.0,0.0],
'origin': [0.0,0.0,0.0],
'homogenization': 1,
'maxgraincount': 0,
'maxmicrostructure': 0,
}
new_header = []
@ -119,7 +119,7 @@ for file in files:
info['origin'][1],
info['origin'][2]))
new_header.append("homogenization\t%i\n"%info['homogenization'])
new_header.append("maxGrainCount\t%i\n"%info['maxgraincount'])
new_header.append("maxMicrostructure\t%i\n"%info['maxmicrostructure'])
# ------------------------------------------ assemble header ---------------------------------------

View File

@ -36,7 +36,7 @@ mappings = {
'dimension': lambda x: float(x),
'origin': lambda x: float(x),
'homogenization': lambda x: int(x),
'maxgraincount': lambda x: int(x),
'maxmicrostructure': lambda x: int(x),
}
@ -85,7 +85,7 @@ for file in files:
'dimension': [0.0,0.0,0.0],
'origin': [0.0,0.0,0.0],
'homogenization': 1,
'maxgraincount': 0,
'maxmicrostructure': 0,
}
new_header = []
@ -127,9 +127,9 @@ for file in files:
info['origin'][1],
info['origin'][2]))
new_header.append("homogenization\t%i\n"%info['homogenization'])
new_header.append("maxGrainCount\t%i\n"%info['maxgraincount'])
if info['maxgraincount'] != 0:
digits = 1+int(math.log10(int(info['maxgraincount'])))
new_header.append("maxMicrostructure\t%i\n"%info['maxmicrostructure'])
if info['maxmicrostructure'] != 0:
digits = 1+int(math.log10(int(info['maxmicrostructure'])))
else:
digits = 1+int(math.log10(int(info['resolution'][0]*info['resolution'][1]*info['resolution'][2])))
print digits