summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Jorgensen, WS at HMXIF <jakob.jorgensen@manchester.ac.uk>2018-05-10 10:17:03 +0100
committerJakob Jorgensen, WS at HMXIF <jakob.jorgensen@manchester.ac.uk>2018-05-10 10:17:03 +0100
commitc2062f3713fce3dc414a5a214a80c1c29f757dd4 (patch)
treeb6b421ef0f9bc970690a540cc74ef2e0b9848684
parente9905059de627978bdcb8a6eda118d10f445d8a7 (diff)
downloadframework-plugins-c2062f3713fce3dc414a5a214a80c1c29f757dd4.tar.gz
framework-plugins-c2062f3713fce3dc414a5a214a80c1c29f757dd4.tar.bz2
framework-plugins-c2062f3713fce3dc414a5a214a80c1c29f757dd4.tar.xz
framework-plugins-c2062f3713fce3dc414a5a214a80c1c29f757dd4.zip
Exclude unnec import
-rwxr-xr-xWrappers/Python/wip/demo_nexus.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Wrappers/Python/wip/demo_nexus.py b/Wrappers/Python/wip/demo_nexus.py
index a51ec2d..ffa5741 100755
--- a/Wrappers/Python/wip/demo_nexus.py
+++ b/Wrappers/Python/wip/demo_nexus.py
@@ -13,8 +13,7 @@ from ccpi.optimisation.algs import FISTA, FBPD, CGLS
from ccpi.optimisation.funcs import Norm2sq, Norm1
from ccpi.plugins.ops import CCPiProjectorSimple
from ccpi.reconstruction.parallelbeam import alg as pbalg
-from ccpi.plugins.processors import CCPiForwardProjector, CCPiBackwardProjector
-from ccpi.processors import Normalizer , CenterOfRotationFinder , AcquisitionDataPadder
+from ccpi.processors import Normalizer, CenterOfRotationFinder, AcquisitionDataPadder
from ccpi.io.reader import NexusReader
# All external imports
@@ -86,12 +85,12 @@ print ("Initial guess")
x_init = ImageData(geometry=ig, dimension_labels=['horizontal_x','horizontal_y','vertical'])
# Run FISTA reconstruction for least squares without regularization
-print ("run FISTA for least squares")
+print ("Run FISTA for least squares")
opt = {'tol': 1e-4, 'iter': 10}
x_fista0, it0, timing0, criter0 = FISTA(x_init, f, None, opt=opt)
plt.imshow(x_fista0.subset(horizontal_x=80).array)
-plt.title('FISTA0')
+plt.title('FISTA LS')
plt.show()
# Set up 1-norm function for FISTA least squares plus 1-norm regularisation
@@ -103,7 +102,7 @@ g0 = Norm1(lam)
x_fista1, it1, timing1, criter1 = FISTA(x_init, f, g0,opt=opt)
plt.imshow(x_fista0.subset(horizontal_x=80).array)
-plt.title('FISTA1')
+plt.title('FISTA LS+1')
plt.show()
# Run FBPD=Forward Backward Primal Dual method on least squares plus 1-norm
@@ -111,7 +110,7 @@ print ("Run FBPD for least squares plus 1-norm regularisation")
x_fbpd1, it_fbpd1, timing_fbpd1, criter_fbpd1 = FBPD(x_init,None,f,g0,opt=opt)
plt.imshow(x_fbpd1.subset(horizontal_x=80).array)
-plt.title('FBPD1')
+plt.title('FBPD LS+1')
plt.show()
# Run CGLS, which should agree with the FISTA least squares