%plot_all_4_sv_image.m

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

close all;fclose all;clear all;

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

%%%%%img = sv_2(:,8:407)';
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 = (10:10:6420);
%%%xaxlab=sv_1(:,1);
xaxlab = sv_1(1:max(r),1);

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

subplot(4,1,1)

imagesc(xaxlab,yaxlab,img);
text(237.25, 521.664, '43 Khz','color','w','fontsize',[4]);
%imagesc(img);

%xlabel('time');
%ylabel('depth');
title('nbp0104\_210am')

%%%%set(gca,'dataaspectratio',[1 5000 1])
set(gca,'units','normalized');   %not really needed
%set(gca,'dataaspectratio',[1 5000 1])


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

hold on;

%%%%firstx = .05;
%%%set(   gcf,'pos',[firstx  50   firstx+dtime*2000   200]   );
%%%set(   gcf,'pos',[firstx  50   firstx+1024   200]   );


%%%%set(   gcf,'pos',[firstx  .25   firstx+0.750   0.400]   );

%set(   gca,'TightInset', [0.1 0.1 0.002 0.07]   );
%set(   gca,'pos', [0 0 1 1]   );

%%%%%set(   gca,'pos', [0.05 0.09 .925 .80] )

subplot(4,1,2)
new_img = sv_2(:,8:407)';
new_img = 10*log10(new_img);
imagesc(xaxlab,yaxlab,new_img);
%%yaxlab=(0:1.5:599);
text(237.25, 521.664, '120 Khz','color','w','fontsize',[4]);
%xaxlab = (10:10:6420);
%%%xaxlab=sv_1(:,1);
%%xaxlab = sv_2(1:max(r),1);





%NOTE:  needs definite improvement!!!
%disp('press any key to make a jpg file');
%pause

%print -djpeg nbp103_137.jpg

%return

hold on;

subplot(4,1,3)
newer_img = sv_3(:,8:407)';
%%yaxlab=(0:1.5:599);

%xaxlab = (10:10:6420);
%%%xaxlab=sv_1(:,1);
%%xaxlab = sv_3(1:max(r),1);
newer_img = 10*log10(newer_img);
imagesc(xaxlab,yaxlab,newer_img);
text(237.25, 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);
imagesc(xaxlab,yaxlab,newest_img);
text(237.25, 521.664, '420 Khz','color','w','fontsize',[4]);

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

hold on;

colorbar;

%figure
%plot(sv_2(:,2),sv_2(:,3))
%grid on

print -djpeg nbp104_210am_all_skip2.jpg
