summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorVaggelis Papoutsellis <22398586+epapoutsellis@users.noreply.github.com>2019-05-07 10:07:34 +0100
committerGitHub <noreply@github.com>2019-05-07 10:07:34 +0100
commit5ba708aee8dd9e69c9302bb2704c991a9721941b (patch)
tree561516d39bb08cd438910902cc10c67fbe3ffea7 /Wrappers
parent6b9fb1a220dc56075deb5645312c202771e54a09 (diff)
downloadframework-5ba708aee8dd9e69c9302bb2704c991a9721941b.tar.gz
framework-5ba708aee8dd9e69c9302bb2704c991a9721941b.tar.bz2
framework-5ba708aee8dd9e69c9302bb2704c991a9721941b.tar.xz
framework-5ba708aee8dd9e69c9302bb2704c991a9721941b.zip
Delete test_profile.py
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/wip/test_profile.py84
1 files changed, 0 insertions, 84 deletions
diff --git a/Wrappers/Python/wip/test_profile.py b/Wrappers/Python/wip/test_profile.py
deleted file mode 100644
index f14c0c3..0000000
--- a/Wrappers/Python/wip/test_profile.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-Created on Mon Apr 8 13:57:46 2019
-
-@author: evangelos
-"""
-
-# profile direct, adjoint, gradient
-
-from ccpi.framework import ImageGeometry
-from ccpi.optimisation.operators import Gradient, BlockOperator, Identity
-from ccpi.optimisation.functions import MixedL21Norm, L2NormSquared, BlockFunction
-import numpy
-
-N, M, K = 2, 3, 2
-
-ig = ImageGeometry(N, M)
-b = ig.allocate('random_int')
-
-G = Gradient(ig)
-Id = Identity(ig)
-
-#operator = BlockOperator(G, Id)
-operator = G
-
-f1 = MixedL21Norm()
-f2 = L2NormSquared(b = b)
-
-f = BlockFunction( f1, f2)
-
-
-x_old = operator.domain_geometry().allocate()
-y_old = operator.range_geometry().allocate('random_int')
-
-
-xbar = operator.domain_geometry().allocate('random_int')
-
-x_tmp = x_old.copy()
-x = x_old.copy()
-
-y_tmp = operator.range_geometry().allocate()
-y = y_old.copy()
-
-y1 = y.copy()
-
-sigma = 20
-
-for i in range(100):
-
- operator.direct(xbar, out = y_tmp)
- y_tmp *= sigma
- y_tmp += y_old
-
-
- y_tmp1 = sigma * operator.direct(xbar) + y_old
-
- print(i)
- print(" y_old :", y_old[0].as_array(), "\n")
- print(" y_tmp[0] :", y_tmp[0].as_array(),"\n")
- print(" y_tmp1[0] :", y_tmp1[0].as_array())
-
-
- numpy.testing.assert_array_equal(y_tmp[0].as_array(), \
- y_tmp1[0].as_array())
-
- numpy.testing.assert_array_equal(y_tmp[1].as_array(), \
- y_tmp1[1].as_array())
-
-
- y1 = f.proximal_conjugate(y_tmp1, sigma)
- f.proximal_conjugate(y_tmp, sigma, y)
-
-
-
-
-
-
-
-
-
-
-
- \ No newline at end of file