From 5dbbb56460fe39ff6373be9a399d0ba6d6d674cb Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 13 Sep 2012 12:28:21 +0000 Subject: [PATCH] fixed bug in 2D output format alignment. --- processing/pre/spectral_geomCanvas.py | 2 +- processing/pre/spectral_geomTranslate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/pre/spectral_geomCanvas.py b/processing/pre/spectral_geomCanvas.py index 15c293f65..2448b985b 100755 --- a/processing/pre/spectral_geomCanvas.py +++ b/processing/pre/spectral_geomCanvas.py @@ -157,7 +157,7 @@ for file in files: translate_y = [i - options.offset[1] for i in yindex] translate_z = [i - options.offset[2] for i in zindex] microstructure_cropped[min(translate_x):(max(translate_x)+1),min(translate_y):(max(translate_y)+1),min(translate_z):(max(translate_z)+1)] = microstructure[min(xindex):(max(xindex)+1),min(yindex):(max(yindex)+1),min(zindex):(max(zindex)+1)] - formatwidth = int(math.floor(math.log10(microstructure.max()+1))) + formatwidth = int(math.floor(math.log10(microstructure.max())+1)) # ------------------------------------------ assemble header --------------------------------------- diff --git a/processing/pre/spectral_geomTranslate.py b/processing/pre/spectral_geomTranslate.py index 005279c47..839592282 100755 --- a/processing/pre/spectral_geomTranslate.py +++ b/processing/pre/spectral_geomTranslate.py @@ -159,7 +159,7 @@ for file in files: microstructure += options.microstructure # shift microstructure indices - formatwidth = int(math.floor(math.log10(microstructure.max()+1))) + formatwidth = int(math.floor(math.log10(microstructure.max())+1)) i = 0 for z in xrange(info['resolution'][2]): for y in xrange(info['resolution'][1]):