-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathESPIRiT.m
31 lines (31 loc) · 1001 Bytes
/
ESPIRiT.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function maps = ESPIRiT(X, r, k, c, w)
% maps = ESPIRiT(X, r, k, c, w)
%
% Function that calculates standard ESPIRiT maps.
%
% INPUTS:
% X - k-space data [kx, ky, nc]
% r - size of calibration region
% k - kernel size
% c - crop threshold
% w - window normalized number of singular values (determines subspace size)
%
% OUTPUTS
% maps - espirit sensitivity maps [kx, ky, nc, nc]
%
% Copyright 2016. The Regents of the University of California.
%
% Authors:
% 2016 Siddharth Iyer <[email protected]>
nc = size(X, 3);
C = extractCalreg(X, r);
imSize = [size(X, 1), size(X, 2)];
A = calreg2calmat(C, k); [U, S, V] = svd(A); s = diag(S);
n = max(floor(wnsvn * k * k), 1);
vecWeight = ones([n, 1]);
vecWeight = [vecWeight; zeros([size(V, 2) - n, 1])];
wV = V * diag(vecWeight);
kernel = reshape(wV, k, k, nc, size(wV, 2));
[M, W] = kernelEig(kernel, [size(X, 1), size(X, 2)]);
maps = cropEigvec(M, W, c);
end