From f2229883b5af396cd66b4e116dc576892fff8d83 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 30 Oct 2012 16:15:10 +0000 Subject: [PATCH] exchanged "maxGrainCount" for "maxMicrostructure", since this is what it really means... --- processing/pre/spectral_geomPack.py | 6 +++--- processing/pre/spectral_geomUnpack.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/processing/pre/spectral_geomPack.py b/processing/pre/spectral_geomPack.py index 699ff7261..d661c2506 100755 --- a/processing/pre/spectral_geomPack.py +++ b/processing/pre/spectral_geomPack.py @@ -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 --------------------------------------- diff --git a/processing/pre/spectral_geomUnpack.py b/processing/pre/spectral_geomUnpack.py index c565b4f10..3e9f07d76 100755 --- a/processing/pre/spectral_geomUnpack.py +++ b/processing/pre/spectral_geomUnpack.py @@ -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