Commit 49e0b8aa by jansen31

### Merge remote-tracking branch 'origin/dornheim' into dornheim

parents 62feea08 4b71000c
File deleted
File deleted
 ... ... @@ -7,7 +7,7 @@ Created on Mon Dec 14 12:53:43 2015 The "Algorithms"-module contains all algorithms provided by the ProxToolbox. """ #from algorithms import Algorithm from .algorithms import Algorithm from .AP import * from .AP_expert import * from .HPR import * ... ...
 ... ... @@ -11,11 +11,13 @@ class P_CDP(ProxOperator): def __init__(self,config): self.Masks = config['Masks'] self.data = config['data'] self.Ny = config['Ny'] self.Nx = config['Nx'] def work(self,u): if (Nx==1) or (Ny==1): if (self.Ny==1) or (self.Nx==1): U = fft(self.Masks*u) U0 = magproj(self.data,u) u = ifft(U0)/self.Masks ... ...
 ... ... @@ -127,17 +127,19 @@ class P_diag(ProxOperator): m = self.m; p = self.p; K = self.K; print(u.shape) if m == 1: tmp = sum(u, axis=0, dtype=u.dtype) elif n == 1: tmp = sum(u, axis=1, dtype=u.dtype) elif p == 1: tmp = zeros((n, m), dtype=u.dtype) tmp = zeros((m,n), dtype=u.dtype) for k in range(K): tmp += u[:, :, k] print(tmp) else: tmp = zeros((n, m, p), dtype=u.dtype) tmp = zeros((m, n, p), dtype=u.dtype) for k in range(K): tmp += u[:, :, :, k] ... ... @@ -148,9 +150,10 @@ class P_diag(ProxOperator): elif n == 1: return tmp.reshape(tmp.size, 1) @ ones((1, K), dtype=u.dtype) elif p == 1: u_diag = empty((n, m, K), dtype=u.dtype) u_diag = empty((m,n, K), dtype=u.dtype) for k in range(K): u_diag[:, :, k] = tmp print(u_diag.shape) return u_diag else: u_diag = empty((n, m, p, K), dtype=u.dtype) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!