summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorGemma Fardell <gfardell@stfc.ac.uk>2019-06-24 10:50:17 +0100
committerGemma Fardell <gfardell@stfc.ac.uk>2019-06-24 10:50:17 +0100
commitb49e77382db690ccacde93b7b947753b930f5458 (patch)
treee26268a8343dcf2af6f8762519d2de65cb4186a6 /Wrappers
parentb83fdeb39c1eb7a5e05fb7326a543079cb6b7d27 (diff)
downloadframework-b49e77382db690ccacde93b7b947753b930f5458.tar.gz
framework-b49e77382db690ccacde93b7b947753b930f5458.tar.bz2
framework-b49e77382db690ccacde93b7b947753b930f5458.tar.xz
framework-b49e77382db690ccacde93b7b947753b930f5458.zip
bug fix on generating test data
Diffstat (limited to 'Wrappers')
-rwxr-xr-xWrappers/Python/ccpi/framework/TestData.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Wrappers/Python/ccpi/framework/TestData.py b/Wrappers/Python/ccpi/framework/TestData.py
index b512e81..eda14ab 100755
--- a/Wrappers/Python/ccpi/framework/TestData.py
+++ b/Wrappers/Python/ccpi/framework/TestData.py
@@ -36,9 +36,9 @@ class TestData(object):
if which == TestData.SIMPLE_PHANTOM_2D:
N = size[0]
M = size[1]
- sdata = numpy.zeros((N,M))
- sdata[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 0.5
- sdata[round(M/8):round(7*M/8),round(3*M/8):round(5*M/8)] = 1
+ sdata = numpy.zeros((N, M))
+ sdata[int(round(N/4)):int(round(3*N/4)), int(round(N/4)):int(round(3*N/4))] = 0.5
+ sdata[int(round(M/8)):int(round(7*M/8)), int(round(3*M/8)):int(round(5*M/8))] = 1
ig = ImageGeometry(voxel_num_x = N, voxel_num_y = M, dimension_labels=[ImageGeometry.HORIZONTAL_X, ImageGeometry.HORIZONTAL_Y])
data = ig.allocate()
data.fill(sdata)