-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmulticoil_plot_mean.m
88 lines (77 loc) · 2.13 KB
/
multicoil_plot_mean.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
function multicoil_plot_mean(rho, C, ll, vs, figname)
% FORMAT multicoil_plot_mean(rho, C, ll, (vs), (figname))
% -------------------------------------------------------------------------
% Set path
path = fileparts(which('multicoil_plot_mean'));
addpath(fullfile(path, 'colormaps'));
addpath(fullfile(path, 'phasemap'));
% -------------------------------------------------------------------------
% Default parameters
if nargin < 5
figname = 'Multicoil mean';
if nargin < 4
vs = [1 1 1];
end
end
% -------------------------------------------------------------------------
% Find window
f = findobj('Type', 'Figure', 'Name', figname);
if isempty(f)
f = figure('Name',figname, 'NumberTitle', 'off');
end
set(0, 'CurrentFigure', f);
% -------------------------------------------------------------------------
% Select slice
z = ceil(size(rho,3)/2);
rho1 = double(rho(:,:,z,:));
% -------------------------------------------------------------------------
% Magnitude
subplot(2,3,1)
h = imagesc(abs(rho1));
colormap(h.Parent, 'gray')
daspect(h.Parent, vs);
axis off
title('magnitude')
% -------------------------------------------------------------------------
% Phase
subplot(2,3,2)
h = imagesc(angle(rho1));
colormap(h.Parent, phasemap(128));
daspect(h.Parent, vs);
axis off
title('phase')
% -------------------------------------------------------------------------
% Real
subplot(2,3,4)
h = imagesc(real(rho1));
colormap(h.Parent, viridis(128));
daspect(h.Parent, vs);
axis off
title('real')
% -------------------------------------------------------------------------
% Imag
subplot(2,3,5)
h = imagesc(imag(rho1));
colormap(h.Parent, viridis(128));
daspect(h.Parent, vs);
axis off
title('imag')
% -------------------------------------------------------------------------
% Covariance
subplot(2,3,3)
h = imagesc(C); colorbar
colormap(h.Parent, viridis(128));
daspect(h.Parent, [1 1 1]);
title('covariance')
% -------------------------------------------------------------------------
% Log-likelihood
subplot(2,3,6)
cla reset
if size(ll,1) == 2
yyaxis right
plot(ll(2,:));
yyaxis left
end
plot(ll(1,:));
title('log-likelihood')
drawnow