diff options
-rw-r--r-- | Wrappers/Python/wip/demo_SIRT.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Wrappers/Python/wip/demo_SIRT.py b/Wrappers/Python/wip/demo_SIRT.py index 66b82a2..5a85d41 100644 --- a/Wrappers/Python/wip/demo_SIRT.py +++ b/Wrappers/Python/wip/demo_SIRT.py @@ -71,12 +71,12 @@ b = Aop.direct(Phantom) z = Aop.adjoint(b) plt.figure() -plt.imshow(b.array) +plt.imshow(b.as_array()) plt.title('Simulated data') plt.show() plt.figure() -plt.imshow(z.array) +plt.imshow(z.as_array()) plt.title('Backprojected data') plt.show() @@ -95,13 +95,13 @@ CGLS_alg.run(opt['iter']) x_CGLS_alg = CGLS_alg.get_output() plt.figure() -plt.imshow(x_CGLS_alg.array) +plt.imshow(x_CGLS_alg.as_array()) plt.title('CGLS ALG') plt.colorbar() plt.show() plt.figure() -plt.semilogy(CGLS_alg.loss) +plt.semilogy(CGLS_alg.objective) plt.title('CGLS criterion') plt.show() @@ -115,13 +115,13 @@ SIRT_alg.run(opt['iter']) x_SIRT_alg = SIRT_alg.get_output() plt.figure() -plt.imshow(x_SIRT_alg.array) +plt.imshow(x_SIRT_alg.as_array()) plt.title('SIRT unconstrained') plt.colorbar() plt.show() plt.figure() -plt.semilogy(SIRT_alg.loss) +plt.semilogy(SIRT_alg.objective) plt.title('SIRT unconstrained criterion') plt.show() @@ -132,13 +132,13 @@ SIRT_alg.run(opt['iter']) x_SIRT_alg2 = SIRT_alg.get_output() plt.figure() -plt.imshow(x_SIRT_alg2.array) +plt.imshow(x_SIRT_alg2.as_array()) plt.title('SIRT unconstrained, extra iterations') plt.colorbar() plt.show() plt.figure() -plt.semilogy(SIRT_alg.loss) +plt.semilogy(SIRT_alg.objective) plt.title('SIRT unconstrained criterion, extra iterations') plt.show() @@ -154,13 +154,13 @@ SIRT_alg0.run(opt['iter']) x_SIRT_alg0 = SIRT_alg0.get_output() plt.figure() -plt.imshow(x_SIRT_alg0.array) +plt.imshow(x_SIRT_alg0.as_array()) plt.title('SIRT nonnegativity constrained') plt.colorbar() plt.show() plt.figure() -plt.semilogy(SIRT_alg0.loss) +plt.semilogy(SIRT_alg0.objective) plt.title('SIRT nonnegativity criterion') plt.show() @@ -173,13 +173,13 @@ SIRT_alg01.run(opt['iter']) x_SIRT_alg01 = SIRT_alg01.get_output() plt.figure() -plt.imshow(x_SIRT_alg01.array) +plt.imshow(x_SIRT_alg01.as_array()) plt.title('SIRT boc(0,1)') plt.colorbar() plt.show() plt.figure() -plt.semilogy(SIRT_alg01.loss) +plt.semilogy(SIRT_alg01.objective) plt.title('SIRT box(0,1) criterion') plt.show() @@ -194,12 +194,12 @@ SIRT_alg0208.run(opt['iter']) x_SIRT_alg0208 = SIRT_alg0208.get_output() plt.figure() -plt.imshow(x_SIRT_alg0208.array) +plt.imshow(x_SIRT_alg0208.as_array()) plt.title('SIRT boc(0.2,0.8)') plt.colorbar() plt.show() plt.figure() -plt.semilogy(SIRT_alg0208.loss) +plt.semilogy(SIRT_alg0208.objective) plt.title('SIRT box(0.2,0.8) criterion') plt.show()
\ No newline at end of file |