imicpe 0.0.9.6__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
imicpe/_version.py CHANGED
@@ -1 +1 @@
1
- __version__="0.0.9.6"
1
+ __version__="1.0.1"
imicpe/cs/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ from .metrics import mse, snr
2
+ from .operators import fwt, iwt, fwt2, iwt2
3
+ from .tikhonov import tikhonov
4
+ from .l1 import l1
5
+ from .shepp_logan_phantom import phantom_shepp_logan
6
+ from .masks import mat2mask, starPattern, getAcquisitionImage #, sub2ind, ind2sub
7
+
8
+ import os
9
+ cameraman = os.path.join(os.path.dirname(__file__), 'cameraman.tif')
imicpe/cs/l1.py ADDED
@@ -0,0 +1,111 @@
1
+
2
+ import numpy as np
3
+ from scipy import ndimage
4
+
5
+ from .operators import *
6
+ from tqdm import tqdm_notebook as tqdm
7
+
8
+ def l1(opreg,A,At,z,x0,lam):
9
+ """
10
+ l1 Algorithme Forward-Backward pour résoudre le problème
11
+ xhat = argmin ||Hx-z||_2^2 + lam.||Gx||_1
12
+ x
13
+
14
+ en particulier :
15
+ - le modèle LASSO si G = Id,
16
+ - le modèle TV si G = D (gradient) ou L (laplacien),
17
+
18
+ Args:
19
+ opreg (string) nom de l'opérateur G sur lequel opère la contrainte de parcimonie {'id', 'gradient', 'laplacien'}
20
+ A (fonction)
21
+ At (fonction)
22
+ z
23
+ x0 (numpy.ndarray)
24
+ lam (float)
25
+
26
+ Returns:
27
+ xhat (numpy.ndarray) solution du problème
28
+ loss (numpy.ndarray) évolution de la fonction de coût au cours des itérations
29
+ """
30
+
31
+ print('Running l1 model with ' +opreg+ ' sparsity constraint...\n\t')
32
+
33
+ ### init ###
34
+ dim = x0.ndim
35
+ match opreg:
36
+ case 'id':
37
+ G = Id
38
+ Gt = Id
39
+ case 'gradient':
40
+ G = D
41
+ Gt = Dt
42
+ case 'laplacien':
43
+ G = L
44
+ Gt = Lt
45
+
46
+ # operator norms
47
+ lipA = opNorm(A,At,dim,x0)
48
+ lipG = opNorm(G,Gt,dim,x0)
49
+
50
+ # cost functions
51
+ def f(x): # data fidelity
52
+ return np.sum(x**2)/2
53
+
54
+ def R(x): # regularization
55
+ return np.sum(np.abs(x))
56
+
57
+ def E(x,lam): # total cost
58
+ return f(A(x)-z) + lam*R(G(x))
59
+
60
+ # proximity operator
61
+ def proxl1(x,gam):
62
+ return x - np.maximum(np.minimum(x,gam*np.ones(x.shape)),-gam*np.ones(x.shape))
63
+
64
+ ### Algo ###
65
+ niter = 1e3; # max number of iterations
66
+ # model hyperparameters
67
+ mu = 5; # Bregman parameter (in [1,10], should not vary)
68
+
69
+ # algo hyperparameters
70
+ gamx = .9/(lipA**2 + mu*lipG**2); #.5e-1; # gradient descent step (x subproblem)
71
+ gamu = 1/mu; # proximal descent step (y subproblem)
72
+
73
+ # initialize variables
74
+ En = np.zeros((int(niter+1),),float) * np.nan
75
+ xn = x0 #np.random.standard_normal((z.shape))
76
+ un = G(xn) # splitting variable
77
+ bn = np.zeros(un.shape,float) # Bregman variable
78
+
79
+ En[0] = E(xn,lam)
80
+
81
+ # loop parameters
82
+ k = 0
83
+ tol = 1e-10
84
+ stop_crit = En[0]
85
+
86
+
87
+ with tqdm(total=niter) as pbar:
88
+ while (k < niter) and (stop_crit > tol):
89
+ # yn subproblem
90
+ Gxn = G(xn)
91
+ un = proxl1(un - gamu*mu*(un-Gxn-bn/mu) , lam*gamu)
92
+
93
+ # xn subproblem (relaxed): gradient descent step instead of GS iteration
94
+ xn = xn - gamx*( At(A(xn)-z) - mu*Gt(un-Gxn-bn/mu) )
95
+
96
+ # bn subproblem
97
+ bn = bn - mu*(un-G(xn))
98
+
99
+ # compute loss
100
+ En[k+1] = E(xn,lam)
101
+
102
+ # update loop parameters
103
+ stop_crit = (En[k] - En[k+1])/En[k]
104
+ k += 1
105
+ pbar.update(1)
106
+
107
+ pbar.close()
108
+ xhat = xn
109
+ loss = En
110
+
111
+ return xhat, loss
imicpe/cs/masks.py ADDED
@@ -0,0 +1,80 @@
1
+
2
+ import numpy as np
3
+ from scipy import ndimage
4
+ import pywt
5
+
6
+
7
+ mat2mask = lambda mat, H, W, M: np.reshape(mat.T, (H, W, M))
8
+
9
+
10
+ def starPattern(N, M):
11
+ """
12
+ starPattern Génère un masque de taille NxN en étoile (tomographie) correspondant à M mesures.
13
+
14
+ Args:
15
+ N (int) Taille du masque
16
+ M (int) Nombre de mesures
17
+
18
+ Returns:
19
+ Amat (numpy.ndarray) Matrice d'acquisition
20
+ mask (numpy.ndarray) Masque
21
+ """
22
+
23
+
24
+ mask2mat = lambda mask: np.reshape(mask, (M, N**2))
25
+
26
+ H = int(N)
27
+ W = int(N)
28
+
29
+ n = int(N)
30
+ r = np.linspace(-1, 1, 3*n)*n
31
+
32
+ nrho = 2**4
33
+ R = np.round(np.linspace(-n/2, n/2, nrho))#.astype(int)
34
+
35
+ ntheta = M//nrho
36
+ T = np.linspace(0, np.pi, ntheta+1, endpoint=False)
37
+
38
+ mask = np.zeros((H, W, ntheta, nrho))
39
+ for itt in range(ntheta):
40
+ theta = T[itt]
41
+
42
+ for itr in range(nrho):
43
+ rho = R[itr]
44
+
45
+ x = np.round(r*np.cos(theta) + n/2 - rho*np.sin(theta))#.astype(int)
46
+ y = np.round(r*np.sin(theta) + n/2 + rho*np.cos(theta))#.astype(int)
47
+
48
+ valid = np.where((x >= 0) & (x < n) & (y >= 0) & (y < n))
49
+ x = x[valid].astype(int)
50
+ y = y[valid].astype(int)
51
+
52
+ tmpM = np.zeros((H, W))
53
+ tmpM[y, x] = 1
54
+
55
+ mask[:, :, itt, itr] = tmpM
56
+
57
+ mask = mask.reshape((H, W, M))
58
+ Amat = mask2mat(mask)
59
+
60
+ return Amat, mask
61
+
62
+
63
+ def getAcquisitionImage(x,mask):
64
+ _, _, Nmeasures = mask.shape
65
+
66
+ zim = np.sum(mask * np.tile(x[..., None], (1, 1, Nmeasures)), axis=2)
67
+ zim = zim / np.max(zim)
68
+
69
+ return zim
70
+
71
+
72
+
73
+ # def sub2ind(array_shape, rows, cols):
74
+ # ind = rows*array_shape[1] + cols
75
+ # return ind.astype(int)
76
+
77
+ # def ind2sub(array_shape, ind):
78
+ # rows = (ind.astype('int') / array_shape[1])
79
+ # cols = (ind.astype('int') % array_shape[1]) # or numpy.mod(ind.astype('int'), array_shape[1])
80
+ # return (int(rows), int(cols))
imicpe/cs/metrics.py ADDED
@@ -0,0 +1,7 @@
1
+ import numpy as np
2
+
3
+ def mse(I,ref):
4
+ return np.sum((I-ref)**2)/I.size
5
+
6
+ def snr(I,ref):
7
+ return 10* np.log10(np.sum(ref**2)/np.sum((I-ref)**2))
imicpe/cs/operators.py ADDED
@@ -0,0 +1,307 @@
1
+
2
+ import numpy as np
3
+ from scipy import ndimage
4
+ import pywt
5
+
6
+
7
+ ############################################################
8
+ ## identity operator
9
+ ############################################################
10
+ def Id(x):
11
+ """
12
+ Opérateur identité
13
+
14
+ Args:
15
+ X (numpy.ndarray) signal 1D
16
+ ou: image non vectorisée 2D
17
+
18
+ Returns:
19
+ (numpy.ndarray) X
20
+ """
21
+
22
+ return x
23
+
24
+
25
+ ############################################################
26
+ ## differential forward and backward operators
27
+ ############################################################
28
+ # gradient
29
+ def D(x):
30
+ """
31
+ Calcule le gradient par différences finies à droite.
32
+ Autrement dit, D(x) calcule le produit matriciel Dx.
33
+
34
+ Args:
35
+ X (numpy.ndarray) signal 1D
36
+ ou: image non vectorisée 2D
37
+
38
+ Returns:
39
+ (numpy.ndarray) Gradient de X
40
+ """
41
+
42
+ if x.ndim == 1:
43
+ grad = np.concatenate((x[1:] - x[:-1], [0]))/2.
44
+
45
+ elif x.ndim == 2:
46
+ sz = x.shape
47
+ Dx_im = np.concatenate(( x[:,1:] - x[:,:-1] , np.zeros((sz[0],1)) ), axis=1)/ 2.
48
+ Dy_im = np.concatenate(( x[1:,:] - x[:-1,:] , np.zeros((1,sz[1])) ), axis=0)/ 2.
49
+
50
+ grad = np.array([Dx_im,Dy_im])
51
+ return grad
52
+
53
+ def Dt(x):
54
+ """
55
+ Calcule l’adjoint gradient par différences finies à droite.
56
+ Autrement dit, Dt(x) calcule le produit matriciel D'x.
57
+
58
+ Args:
59
+ X (numpy.ndarray) signal 1D
60
+ ou: image non vectorisée 2D
61
+
62
+ Returns:
63
+ (numpy.ndarray) Divergence de X
64
+ """
65
+
66
+ if x.ndim == 1:
67
+ div = - np.concatenate(([x[0]], x[1:-1] - x[:-2], [-x[-2]])) /2.
68
+
69
+ elif x.ndim == 3:
70
+ x1 = x[0]
71
+ x2 = x[1]
72
+ div = - np.concatenate((x1[:,[0]], x1[:,1:-1] - x1[:,:-2], -x1[:,[-2]]), axis=1) /2. \
73
+ - np.concatenate((x2[[0],:], x2[1:-1,:] - x2[:-2,:], -x2[[-2],:]), axis=0) /2.
74
+ return div
75
+
76
+ # laplacian
77
+ def L(x):
78
+ """
79
+ Calcule la dérivée seconde d’un signal, ou le laplacien dans le cas d’une image.
80
+ Autrement dit, L(x) calcule le produit matriciel Lx.
81
+
82
+ Args:
83
+ X (numpy.ndarray) signal 1D
84
+ ou: image non vectorisée 2D
85
+
86
+ Returns:
87
+ (numpy.ndarray) Laplacien de X
88
+ """
89
+
90
+ if x.ndim == 1:
91
+ ker = np.array([1, -2, 1])
92
+ #lap = np.convolve(x,ker,'same')
93
+ lap = ndimage.convolve1d(x,ker,mode='nearest')
94
+ elif x.ndim == 2:
95
+ ker = np.array([[0, 1, 0], [1, -4, 1], [0, 1, 0]]) # V4
96
+ #ker = np.array([[1, 1, 1], [1, -8, 1], [1, 1, 1]]) # V8
97
+ lap = ndimage.convolve(x,ker,mode='nearest')
98
+ return lap
99
+
100
+ def Lt(x):
101
+ """
102
+ Calcule l’adjoint du laplacien.
103
+ Autrement dit, Lt(x) calcule le produit matriciel L'x.
104
+
105
+ Args:
106
+ X (numpy.ndarray) signal 1D
107
+ ou: image non vectorisée 2D
108
+
109
+ Returns:
110
+ (numpy.ndarray) Adjoint du Laplacien de X
111
+ """
112
+
113
+ if x.ndim == 1:
114
+ ker = np.array([1, -2, 1])
115
+ #lap = np.correlate(x,ker,'same')
116
+ lap = ndimage.correlate1d(x,ker,mode='nearest')
117
+ elif x.ndim == 2:
118
+ ker = np.array([[0, 1, 0], [1, -4, 1], [0, 1, 0]]) # V4
119
+ #ker = np.array([[1, 1, 1], [1, -8, 1], [1, 1, 1]]) # V8
120
+ lap = ndimage.correlate(x,ker,mode='nearest')
121
+ return lap
122
+
123
+
124
+ ############################################################
125
+ ## Wavelet transforms
126
+ ############################################################
127
+ def fwt(x,wavelet,level):
128
+ """
129
+ Calcule la transformée en ondelettes directe 1D.
130
+
131
+ Args:
132
+ x (numpy.ndarray) signal 1D
133
+
134
+ Returns:
135
+ (numpy.ndarray) Vecteur des coefficients de la décomposition en ondelettes de x
136
+ """
137
+
138
+ dim = x.ndim
139
+
140
+ coeffs = pywt.wavedec(x, wavelet, level=level, mode="periodization")
141
+ coeff_arr, _, _ = pywt.ravel_coeffs(coeffs)
142
+
143
+ return coeff_arr
144
+
145
+
146
+ def iwt(x,wavelet,level):
147
+ """
148
+ Calcule la transformée en ondelettes inverse 1D.
149
+
150
+ Args:
151
+ x (numpy.ndarray) Vecteur des coefficients d'ondelettes
152
+ wavelet (string) Nom de l'ondelette mère (voir la librairie pywt)
153
+ level (int) Niveau de décompisition
154
+
155
+ Returns:
156
+ (numpy.ndarray) Signal correspondant aux coefficients d'ondelettes donnés par x
157
+ """
158
+
159
+ J = level
160
+ N = len(x)
161
+ _, coeffs_slices, coeffs_shapes = pywt.ravel_coeffs(pywt.wavedec(np.ones(N), wavelet=wavelet, level=J, mode='periodization'))
162
+
163
+ if coeffs_shapes is None:
164
+ # compute coeffs size at each level
165
+ sizes = [N // (2**j) for j in range(J, 0, -1)] + [N // (2**J)]
166
+
167
+ # coefficients splitting
168
+ start = 0
169
+ coeffs = []
170
+ for size in reversed(sizes):
171
+ coeffs.append(x[start:start + size])
172
+ start += size
173
+ else:
174
+ coeffs = pywt.unravel_coeffs(x, coeffs_slices, coeffs_shapes, output_format='wavedec')
175
+
176
+ # reconstruct corresponding signal
177
+ signal = pywt.waverec(coeffs, wavelet, mode="periodization")
178
+
179
+ return signal
180
+
181
+
182
+ def fwt2(x,wavelet,level):
183
+ """
184
+ Calcule la transformée en ondelettes directe 2D.
185
+
186
+ Args:
187
+ x (numpy.ndarray) image NON vectorisée 2D
188
+ wavelet (string) Nom de l'ondelette mère (voir la librairie pywt)
189
+ level (int) Niveau de décompisition
190
+
191
+ Returns:
192
+ (numpy.ndarray) Vecteur des coefficients de la décomposition en ondelettes de x
193
+ """
194
+
195
+ coeffs = pywt.wavedec2(x, wavelet, level=level, mode="periodization")
196
+ coeff_arr, _, _ = pywt.ravel_coeffs(coeffs)
197
+
198
+ return coeff_arr
199
+
200
+ def iwt2(x,wavelet,level):
201
+ """
202
+ Calcule la transformée en ondelettes inverse 2D.
203
+
204
+ Args:
205
+ x (numpy.ndarray) Vecteur des coefficients d'ondelettes
206
+ wavelet (string) Nom de l'ondelette mère (voir la librairie pywt)
207
+ level (int) Niveau de décompisition
208
+
209
+ Returns:
210
+ (numpy.ndarray) Image correspondante aux coefficients d'ondelettes donnés par x
211
+ """
212
+
213
+ J = level
214
+ N = len(x)
215
+
216
+ _, coeffs_slices, coeffs_shapes = pywt.ravel_coeffs(pywt.wavedec2(np.ones((int(np.sqrt(N)),int(np.sqrt(N)))), wavelet=wavelet, level=J, mode='periodization'))
217
+
218
+ coeffs = pywt.unravel_coeffs(x, coeffs_slices, coeffs_shapes,
219
+ output_format='wavedec2')
220
+
221
+ # reconstruct corresponding signal
222
+ image = pywt.waverec2(coeffs, wavelet, mode="periodization")
223
+
224
+ return image
225
+
226
+
227
+ ############################################################
228
+ ## Operator and matrix norm
229
+ ############################################################
230
+ def opNorm(op,opt,dim,xn):
231
+ """
232
+ Calcule la norme de l'opérateur OP, dont
233
+ l'opérateur transposé est OPT, en dimension DIM
234
+
235
+ Args:
236
+ OP (function) opérateur direct
237
+ OPT (function) opérateur adjoint
238
+ DIM (int) 1 or 2
239
+
240
+ Returns:
241
+ (float) norme de l'opérateur OP
242
+ """
243
+
244
+ def T(x):
245
+ return opt(op(x))
246
+
247
+ # match dim:
248
+ # case 1:
249
+ # xn = np.random.standard_normal((64))
250
+ # case 2:
251
+ # xn = np.random.standard_normal((64,64))
252
+
253
+ xnn = xn
254
+
255
+ n = np.zeros((1000,),float)
256
+ n[1] = 1
257
+ tol = 1e-4
258
+ rhon = n[1]+2*tol
259
+
260
+ k = 1
261
+ while abs(n[k]-rhon)/n[k] >= tol:
262
+ xn = T(xnn)
263
+ xnn = T(xn)
264
+
265
+ rhon = n[k]
266
+ n[k+1] = np.sum(xnn**2)/np.sum(xn**2)
267
+
268
+ k = k+1
269
+
270
+ N = n[k-1] + 1e-16
271
+ return 1.01* N**(.25) # sqrt(L) gives |||T|||=|||D'D||| ie |||D|||^2
272
+
273
+
274
+ def matNorm(M):
275
+ """
276
+ Calcule la norme de la matrice M
277
+
278
+ Args:
279
+ M (numpy.ndarray) matrice dont on souhaite calculer la norme
280
+
281
+ Returns:
282
+ (float) norme de la matrice M
283
+ """
284
+
285
+ def T(x):
286
+ return np.dot(M.T, np.dot(M,x))
287
+
288
+ xn = np.random.standard_normal((M.shape[1]))
289
+ xnn = xn
290
+
291
+ n = np.zeros((1000,),float)
292
+ n[1] = 1
293
+ tol = 1e-4
294
+ rhon = n[1]+2*tol
295
+
296
+ k = 1
297
+ while abs(n[k]-rhon)/n[k] >= tol:
298
+ xn = T(xnn)
299
+ xnn = T(xn)
300
+
301
+ rhon = n[k]
302
+ n[k+1] = np.sum(xnn**2)/np.sum(xn**2)
303
+
304
+ k = k+1
305
+
306
+ N = n[k-1] + 1e-16
307
+ return 1.01* N**(.25) # sqrt(L) gives |||T|||=|||D'D||| ie |||D|||^2
@@ -0,0 +1,21 @@
1
+
2
+ import numpy as np
3
+
4
+ from skimage.data import shepp_logan_phantom
5
+ from skimage.transform import rescale, resize
6
+
7
+ def phantom_shepp_logan(N):
8
+ """
9
+ phantom_shepp_logan Génère le phantom de Shepp-Logan 2D de taille NxN.
10
+
11
+ Args:
12
+ N (int) Taille du phantom
13
+
14
+ Returns:
15
+ (numpy.ndarray) Image du phantom
16
+ """
17
+ p = shepp_logan_phantom()
18
+ p = resize(p, (int(N),int(N)), anti_aliasing=False)
19
+ p[p<1e-10] = .1
20
+
21
+ return p
imicpe/cs/tikhonov.py ADDED
@@ -0,0 +1,95 @@
1
+
2
+ import numpy as np
3
+ from scipy import ndimage
4
+
5
+ from .operators import *
6
+ from tqdm import tqdm_notebook as tqdm
7
+
8
+ def tikhonov(opreg,A,At,z,x0,lam):
9
+ """
10
+ tikhonov Algorithme de descente de gradient pour résoudre le problème
11
+ xhat = argmin ||Hx-z||_2^2 + lam.||Gx||_2^2
12
+ x
13
+
14
+
15
+ Args:
16
+ opreg (string) nom de l'opérateur G sur lequel opère la contrainte de parcimonie {'id', 'gradient', 'laplacien'}
17
+ A (fonction)
18
+ At (fonction)
19
+ z
20
+ x0 (numpy.ndarray)
21
+ lam (float)
22
+
23
+ Returns:
24
+ xhat (numpy.ndarray) solution du problème
25
+ loss (numpy.ndarray) évolution de la fonction de coût au cours des itérations
26
+ """
27
+
28
+ print('Running Tikhonov model with ' +opreg+ ' sparsity constraint...\n\t')
29
+
30
+ ### init ###
31
+ dim = x0.ndim
32
+ match opreg:
33
+ case 'id':
34
+ G = Id
35
+ Gt = Id
36
+ case 'gradient':
37
+ G = D
38
+ Gt = Dt
39
+ case 'laplacien':
40
+ G = L
41
+ Gt = Lt
42
+
43
+ # operator norms
44
+ lipA = opNorm(A,At,dim,x0)
45
+ lipG = opNorm(G,Gt,dim,x0)
46
+
47
+ # cost functions
48
+ def f(x): # data fidelity
49
+ return np.sum(x**2)/2
50
+
51
+ def R(x): # regularization
52
+ return np.sum(x**2)/2
53
+
54
+ def E(x,lam): # total cost
55
+ return f(A(x)-z) + lam*R(G(x))
56
+
57
+ # proximity operator
58
+ def proxl1(x,gam):
59
+ return x - np.maximum(np.minimum(x,gam*np.ones(x.shape)),-gam*np.ones(x.shape))
60
+
61
+ ### Algo ###
62
+ niter = 1e3; # max number of iterations
63
+
64
+ # algo hyperparameters
65
+ gam = .9/(2*lipA**2 + 2*lam*lipG**2); # gradient descent step
66
+
67
+ # initialize variables
68
+ En = np.zeros((int(niter+1),),float) * np.nan
69
+ xn = x0 #np.random.standard_normal((z.shape))
70
+
71
+ En[0] = E(xn,lam)
72
+
73
+ # loop parameters
74
+ k = 0
75
+ tol = 1e-10
76
+ stop_crit = En[0]
77
+
78
+ with tqdm(total=niter) as pbar:
79
+ while (k < niter) and (stop_crit > tol):
80
+ # xn subproblem
81
+ xn = xn - 2*gam*(At(A(xn)-z) + lam*Gt(G(xn)))
82
+
83
+ # compute loss
84
+ En[k+1] = E(xn,lam)
85
+
86
+ # update loop parameters
87
+ stop_crit = (En[k] - En[k+1])/En[k]
88
+ k += 1
89
+ pbar.update(1)
90
+
91
+ pbar.close()
92
+ xhat = xn
93
+ loss = En
94
+
95
+ return xhat, loss
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imicpe
3
- Version: 0.0.9.6
3
+ Version: 1.0.1
4
4
  Summary: Toolbox for Maths,Signal,Image Teaching @ CPE
5
5
  Author-email: Marion Foare <marion.foare@cpe.fr>, Eric Van Reeth <eric.vanreeth@cpe.fr>, Arthur Gautheron <arthur.gautheron@cpe.fr>
6
6
  License: MIT License
@@ -18,6 +18,8 @@ Requires-Dist: plotly
18
18
  Requires-Dist: torch
19
19
  Requires-Dist: torchvision
20
20
  Requires-Dist: tqdm
21
+ Requires-Dist: PyWavelets
22
+ Requires-Dist: scikit-image
21
23
 
22
24
 
23
25
  A toolbox used for practical sessions at [CPE Lyon](https://www.cpe.fr/).
@@ -36,7 +38,6 @@ Developped and maintained for teaching usage only!
36
38
  # Usage example
37
39
 
38
40
  The example below uses the mse method available in the `optim.metrics` subpackage of `imicpe`.
39
- It requires `numpy.randn` to generate a gaussian distribution of N points.
40
41
 
41
42
  ```python
42
43
  import numpy as np
@@ -0,0 +1,20 @@
1
+ imicpe/__init__.py,sha256=WjDmvecyDIyJLYp4rCV9vsSYbQDc4L1EpYqORvEXliI,33
2
+ imicpe/_version.py,sha256=vRtpV4QvaaLrrZMjIln1ofzgVGQL__6NX5bdnCWLsyo,20
3
+ imicpe/cs/__init__.py,sha256=fLe1o5jNvrB4qEVBE6amEV9i3NFwM3E_uGiiiHXrph0,339
4
+ imicpe/cs/l1.py,sha256=3Bq3Ryk1mRAvti0lVR4u6Lj7aq2zr_Qxye0_doO8n_0,3266
5
+ imicpe/cs/masks.py,sha256=5ehQ-QnYY4trBt7BIx0Pp8DUa3x5KApkc7TPp9LA9Pc,2030
6
+ imicpe/cs/metrics.py,sha256=DuUYpW7s1LkZTDV32D5K4wdSRXpH1Ymunjp2vq6kzfA,148
7
+ imicpe/cs/operators.py,sha256=pTA8gu_17yoBD4Hs7Cvg0PWUX4xrcMr6DJxyNYX9yBA,9028
8
+ imicpe/cs/shepp_logan_phantom.py,sha256=_RDHimZI6R8uyAwXNyB3BldYjCiNDRorDmPYoJR0T6Q,485
9
+ imicpe/cs/tikhonov.py,sha256=6msVAXrzRBVHMIdh1mK6pf1zRjhnsdhDAQwEOpA-PuU,2518
10
+ imicpe/optim/__init__.py,sha256=rkguPFq7gdmBgm_Xrry2yr1oquEIxE00On2emjRMgZE,344
11
+ imicpe/optim/metrics.py,sha256=AHqudKDch1_jc7X2_9hz30RamEqfQ132GXr3qW81VPY,187
12
+ imicpe/optim/operators.py,sha256=BbyqE9ARZF-q8EkxyDOv1V8Rlz52t9sbo2gI22zQAzA,10648
13
+ imicpe/optim/pnnDataset.py,sha256=PFh5u0SXx761O6N6vVfWfEDmzmCm87eYzAL7mWHBRrw,3971
14
+ imicpe/optim/pnnTrainer.py,sha256=3ygh9XwFJN7jMPsEG3LHLa8sgBbDd9Yu_QWg4ZtM_DM,4571
15
+ imicpe/optim/pnnUtils.py,sha256=LXU7wRfuEi6t-2VG2NStPAOzu19OKTxzNNnbHESpC2U,1523
16
+ imicpe-1.0.1.dist-info/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
17
+ imicpe-1.0.1.dist-info/METADATA,sha256=Y48wEzSrCzEzMlMgW2tBIyzl0k1Q9L6zd3zt4wtz_Kk,1317
18
+ imicpe-1.0.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
19
+ imicpe-1.0.1.dist-info/top_level.txt,sha256=6_gSXCYolzjXHaIDeAsZ_M3nLXdqrMKt48XCz3reJc0,7
20
+ imicpe-1.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,13 +0,0 @@
1
- imicpe/__init__.py,sha256=WjDmvecyDIyJLYp4rCV9vsSYbQDc4L1EpYqORvEXliI,33
2
- imicpe/_version.py,sha256=9DkMTbhO7UihScNJHSPbYZ7AsBSmaLROyHx_71Xc4UU,22
3
- imicpe/optim/__init__.py,sha256=rkguPFq7gdmBgm_Xrry2yr1oquEIxE00On2emjRMgZE,344
4
- imicpe/optim/metrics.py,sha256=AHqudKDch1_jc7X2_9hz30RamEqfQ132GXr3qW81VPY,187
5
- imicpe/optim/operators.py,sha256=BbyqE9ARZF-q8EkxyDOv1V8Rlz52t9sbo2gI22zQAzA,10648
6
- imicpe/optim/pnnDataset.py,sha256=PFh5u0SXx761O6N6vVfWfEDmzmCm87eYzAL7mWHBRrw,3971
7
- imicpe/optim/pnnTrainer.py,sha256=3ygh9XwFJN7jMPsEG3LHLa8sgBbDd9Yu_QWg4ZtM_DM,4571
8
- imicpe/optim/pnnUtils.py,sha256=LXU7wRfuEi6t-2VG2NStPAOzu19OKTxzNNnbHESpC2U,1523
9
- imicpe-0.0.9.6.dist-info/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
10
- imicpe-0.0.9.6.dist-info/METADATA,sha256=E-lk1Y_IRN9PVce-EVie5ik6CWOlcjV0r8pqg_MBS9E,1340
11
- imicpe-0.0.9.6.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
12
- imicpe-0.0.9.6.dist-info/top_level.txt,sha256=6_gSXCYolzjXHaIDeAsZ_M3nLXdqrMKt48XCz3reJc0,7
13
- imicpe-0.0.9.6.dist-info/RECORD,,