%plot_all_4_sv_image.m

%NOTE: don't forget to make the "make104_...._image.m files

close all;fclose all;clear all;

filename='nbp103_119';
load (filename);
[r,c]=size(sv_1(:,8:end));

img = sv_1(:,8:407)';
img = 10*log10(img + 10^-10);  %% this is to not take the log of a negative number
yaxlab=(0:1.5:599);

xaxlab = sv_1(1:max(r),1);

figure
set(gcf,'units','normalized');

subplot(4,1,1)

imagesc(xaxlab,yaxlab,img);

%%%%%set(gca,'clim',[-100 -43]);   %This is to use same color scale for
%%%%%same channel day to day  -- get away from auto scaling

text(106.35, 521.664, '43 Khz','color','w','fontsize',[4]);

title('nbp0103\_119')

set(gca,'units','normalized');   %not really needed

lasttime = size(img,2);
dtime = sv_2(lasttime,1) - sv_2(1, 1);

hold on;

subplot(4,1,2)
new_img = sv_2(:,8:407)';
new_img = 10*log10(new_img + 10^-10);
imagesc(xaxlab,yaxlab,new_img);

text(106.35, 521.664, '120 Khz','color','w','fontsize',[4]);

hold on;

subplot(4,1,3)
newer_img = sv_3(:,8:407)';

newer_img = 10*log10(newer_img + 10^-10);
imagesc(xaxlab,yaxlab,newer_img);
text(106.35, 521.664, '200 Khz','color','w','fontsize',[4]);


hold on;

subplot(4,1,4)
newest_img = sv_4(:,8:407)';
newest_img = 10*log10(newest_img + 10^-10);
imagesc(xaxlab,yaxlab,newest_img);
text(106.35, 521.664, '420 Khz','color','w','fontsize',[4]);

xlabel('time');
ylabel('depth');

hold on;

colorbar;

print -djpeg nbp103_119_all.jpg
