summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorjakobsj <jakobsj@users.noreply.github.com>2018-04-23 15:59:45 +0100
committerGitHub <noreply@github.com>2018-04-23 15:59:45 +0100
commit150bad45f5268dbc58b0c449d19d0dbb79b9ba30 (patch)
treef6ef8b7f4953eec1058e9ca1b1ec22533406de51 /Wrappers/Python
parenta4194a7d1925df7c780efbadf9b719babe8b659d (diff)
parentf49694c68a411b622d1932faa861995069769d39 (diff)
downloadastra-wrapper-150bad45f5268dbc58b0c449d19d0dbb79b9ba30.tar.gz
astra-wrapper-150bad45f5268dbc58b0c449d19d0dbb79b9ba30.tar.bz2
astra-wrapper-150bad45f5268dbc58b0c449d19d0dbb79b9ba30.tar.xz
astra-wrapper-150bad45f5268dbc58b0c449d19d0dbb79b9ba30.zip
Merge pull request #5 from vais-ral/fix_tv
Uncomment TV in demo
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/wip/simple_demo_astra.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/Wrappers/Python/wip/simple_demo_astra.py b/Wrappers/Python/wip/simple_demo_astra.py
index b4f0c61..8529c98 100755
--- a/Wrappers/Python/wip/simple_demo_astra.py
+++ b/Wrappers/Python/wip/simple_demo_astra.py
@@ -153,16 +153,16 @@ plt.show()
# The FBPD algorithm can also be used conveniently for TV regularisation:
# Specify TV function object
-#lamtv = 1
-#gtv = TV2D(lamtv)
-#
-#x_fbpdtv,it_fbpdtv,timing_fbpdtv,criter_fbpdtv=FBPD(x_init,None,f,gtv,opt_FBPD)
-#
-#plt.imshow(x_fbpdtv.array)
-#plt.show()
-#
-#plt.semilogy(criter_fbpdtv)
-#plt.show()
+lamtv = 1
+gtv = TV2D(lamtv)
+
+x_fbpdtv,it_fbpdtv,timing_fbpdtv,criter_fbpdtv=FBPD(x_init,None,f,gtv,opt_FBPD)
+
+plt.imshow(x_fbpdtv.array)
+plt.show()
+
+plt.semilogy(criter_fbpdtv)
+plt.show()
# Compare all reconstruction and criteria
@@ -201,11 +201,11 @@ a.set_title('FBPD LS+1')
imgplot = plt.imshow(x_fbpd1.as_array(),vmin=clims[0],vmax=clims[1])
plt.axis('off')
-#current = current + 1
-#a=fig.add_subplot(rows,cols,current)
-#a.set_title('FBPD TV')
-#imgplot = plt.imshow(x_fbpdtv.as_array(),vmin=clims[0],vmax=clims[1])
-#plt.axis('off')
+current = current + 1
+a=fig.add_subplot(rows,cols,current)
+a.set_title('FBPD TV')
+imgplot = plt.imshow(x_fbpdtv.as_array(),vmin=clims[0],vmax=clims[1])
+plt.axis('off')
fig = plt.figure()
b=fig.add_subplot(1,1,1)
@@ -214,6 +214,6 @@ imgplot = plt.loglog(criter_CGLS, label='CGLS')
imgplot = plt.loglog(criter0 , label='FISTA LS')
imgplot = plt.loglog(criter1 , label='FISTA LS+1')
imgplot = plt.loglog(criter_fbpd1, label='FBPD LS+1')
-#imgplot = plt.loglog(criter_fbpdtv, label='FBPD TV')
+imgplot = plt.loglog(criter_fbpdtv, label='FBPD TV')
b.legend(loc='lower left')
plt.show()