%
% matlab script to illustrate plotting of data from
% BYU high resolution sigma0 OCEAN files using loadBYUhrsig.m

% put file name here
file='QS_S1B01222.20001321756.avewr';


% read everything
[shf,sha,svf,sva,lat,lon,land,ahf,aha,avf,ava,ihf,iha,ivf,iva]=loadBYUhrsig(file);

figure(1); colorbar
imagesc(shf,[-40 0]);
colormap('gray')
title('Fore H sigma-0 (dB)');
xlabel('Along-track');
ylabel('Cross-track');

figure(2); colorbar
imagesc(sha,[-40 0]);
colormap('gray')
title('Aft H sigma-0 (dB)');
xlabel('Along-track');
ylabel('Cross-track');

figure(3); colorbar
imagesc(svf,[-40 0]);
colormap('gray')
title('Fore V sigma-0 (dB)');
xlabel('Along-track');
ylabel('Cross-track');

figure(4); colorbar
imagesc(sva,[-40 0]);
colormap('gray')
title('Aft V sigma-0 (dB)');
xlabel('Along-track');
ylabel('Cross-track');

figure(5)
imagesc(lat); colorbar
title('Latitude (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(6)
imagesc(lon); colorbar
title('Longitude (deg)');
xlabel('Along-track');
ylabel('Cross-track');


if 1 % optionally plot additional images

figure(7)
imagesc(ahf); colorbar
title('Fore H Azimuth angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(8)
imagesc(aha); colorbar
title('Aft H Azimuth angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(9)
imagesc(avf); colorbar
title('Fore V Azimuth angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(10)
imagesc(ava); colorbar
title('Aft V Azimuth angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(11)
imagesc(ihf,[40 60]); colorbar
title('Fore H Incidence angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(12)
imagesc(iha,[40 60]); colorbar
title('Aft H Incidence angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(13)
imagesc(ivf,[40 60]); colorbar
title('Fore V Incidence angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

figure(14)
imagesc(iva,[40 60]); colorbar
title('Aft V Incidence angle (deg)');
xlabel('Along-track');
ylabel('Cross-track');

end

figure(15)
imagesc(land); 
title('Land map');
xlabel('Along-track');
ylabel('Cross-track');

