-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFM_plotting.m
61 lines (48 loc) · 1.38 KB
/
FM_plotting.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
clear all;
load('fieldmap_fit_231017.mat');
field_mat_mag = sqrt(field_mat_Bx.^2+field_mat_By.^2+field_mat_Bz.^2);
%% B0 is in the X direction of the magnet
field_mat_use = field_mat_Bx; %%choose which component to plot
%% plotting
meanB = mean(field_mat_use(:));
C1 = (meanB - 0.1);
C2 = (meanB + 0.1);
r = 50; % FOV radius in mm
x=0;
y=0;
th = 0:pi/100:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
fitmaxpos = max(pos_fit(:));
figure;
subplot(1,3,1);
imagesc([-fitmaxpos,fitmaxpos],[-fitmaxpos,fitmaxpos],rot90(squeeze(field_mat_use(:,ceil(end/2),:)))); axis square;
% caxis([Bmean-cxx,Bmean+cxx]);
caxis([C1,C2]);
colormap jet;
xlabel('x (m)');
ylabel('z (m)');
colorbar;
title('B0mag (mT) at y = 0');
hold on; plot(xunit, yunit, '-k');
axis square;
subplot(1,3,2);
imagesc([-fitmaxpos,fitmaxpos],[-fitmaxpos,fitmaxpos],rot90(squeeze(field_mat_use(ceil(end/2),:,:)))); axis square;
caxis([C1,C2]);
colormap jet;
xlabel('y (m)');
ylabel('z (m)');
colorbar;
title('B0mag (mT) at x = 0');
hold on; plot(xunit, yunit, '-k');
axis square;
subplot(1,3,3);
imagesc([-fitmaxpos,fitmaxpos],[-fitmaxpos,fitmaxpos],rot90(squeeze(field_mat_use(:,:,ceil(end/2))))); axis square;
caxis([C1,C2]);
colormap jet;
xlabel('x (m)');
ylabel('y (m)');
colorbar;
title('B0mag (mT) at z = 0');
hold on; plot(xunit, yunit, '-k');
axis square;