summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-05-10 12:25:03 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-05-10 12:25:03 +0100
commitfd3cc5601e9aad0b516ea73a34eef839861ab8f8 (patch)
tree51c98c0eb195e215b8040828e42896e5bef6f94b /Wrappers
parentdb6697057dbbc3661fdd627a2c9fc43cbf728cbd (diff)
downloadframework-fd3cc5601e9aad0b516ea73a34eef839861ab8f8.tar.gz
framework-fd3cc5601e9aad0b516ea73a34eef839861ab8f8.tar.bz2
framework-fd3cc5601e9aad0b516ea73a34eef839861ab8f8.tar.xz
framework-fd3cc5601e9aad0b516ea73a34eef839861ab8f8.zip
still not correct
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py b/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
index e298d92..d808e63 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
@@ -25,7 +25,7 @@ import functools
class KullbackLeibler(Function):
- ''' Assume that data > 0
+ ''' Assume that data >= 0
'''
@@ -125,7 +125,18 @@ class KullbackLeibler(Function):
'''
- return ScaledFunction(self, scalar)
+ return ScaledFunction(self, scalar)
+
+
+if __name__ == '__main__':
+
+ from ccpi.framework import ImageGeometry
+ import numpy
+
+ M, N = 2,3
+ ig = ImageGeometry(voxel_num_x=M, voxel_num_y = N)
+ u = ig.allocate('random_int')
+ b = np.random.normal(0, 0.1, size=ig.shape)