summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Jorgensen <jakob.jorgensen@manchester.ac.uk>2018-04-23 15:55:54 +0100
committerJakob Jorgensen <jakob.jorgensen@manchester.ac.uk>2018-04-23 15:55:54 +0100
commitf49694c68a411b622d1932faa861995069769d39 (patch)
treef6ef8b7f4953eec1058e9ca1b1ec22533406de51
parenta4194a7d1925df7c780efbadf9b719babe8b659d (diff)
downloadastra-wrapper-f49694c68a411b622d1932faa861995069769d39.tar.gz
astra-wrapper-f49694c68a411b622d1932faa861995069769d39.tar.bz2
astra-wrapper-f49694c68a411b622d1932faa861995069769d39.tar.xz
astra-wrapper-f49694c68a411b622d1932faa861995069769d39.zip
Uncomment TV in demo
-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()