-
Notifications
You must be signed in to change notification settings - Fork 2
/
displayPhase.m
28 lines (26 loc) · 949 Bytes
/
displayPhase.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title: displayPhase.m
% Author: Fred J. Frigo
% Description: Displays the phase data for the provided array
%
% @param raw_frames array containing the raw data to be displayed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function displayPhase(raw_frames, plotString)
num_frames = size(raw_frames,3);
num_rows = size(raw_frames,2);
num_cols = size(raw_frames,1);
figure;
for i=1:num_frames
phase_image = angle(raw_frames(:,:,i));
mag_image = abs(raw_frames(:,:,i));
mask_image = (mag_image > 0.02); %create mask image with threshold
mask_phase = mask_image.*phase_image;
for j=1:num_rows
unwrap_phase(j,:)=unwrap(mask_phase(j,:));
end
subplot(2,4,i);
imagesc(unwrap_phase.*mask_image);
colormap('jet');
title(sprintf('%s, receiver %d', plotString, i));
end
end