function ep_view % EP_VIEW - View data in ep1 and ep2 % % Use As: ep_view % % EP_VIEW is a quick viewer program to look at the data in % //tsunami.shore.mbari.org/oasis/eqpac/ep* directories. It scrolls % through graphs of each column of data and the products derived % from the data. To advance to the nxt graph press any key to stop the % program press [CTRL] + C % Brian Schlining % 23 Feb 1999 warning off ep_ini; % Load the header of each column of data (ColumnS) x = ep_cmpl; % Read the data files in epX directories on tsunami n = length(x); % Get the number of directories read [r c] = size(x(1).dat); % Get the number of columns of data for j = 1:c % Loop through each column for i = 1:n % Loop through each ep directory subplot(n,1,i); %====================== % Deal with Y2K issues %====================== d = dy2date(x(i).dat(:,3)); y2k = find(x(i).dat(:,3) < 95); if ~isempty(y2k) d(y2k) = dy2date(x(i).dat(y2k,3) + 2000); end y1k = find(x(i).dat(:,3) >= 95); if ~isempty(y1k) d(y1k) = dy2date(x(i).dat(y1k,3) + 1900); end %=============== % Plot the data %=============== plot(d,x(i).dat(:,j),'k.'); datetick('x',6) if i == 1 title(['Column ' num2str(j) ': ' char(ColumnS(j)) ' ' char(UnitsS(j))]) end aH(i) = gca; XLim(i,:) = get(aH(i),'XLim'); YLim(i,:) = get(aH(i),'YLim'); end XLim = [min(XLim(:,1)) max(XLim(:,2))]; YLim = [min(YLim(:,1)) max(YLim(:,2))]; for i = 1:n set(aH(i),'XLim',XLim,'YLim',YLim) end disp(['Column ' num2str(j) ': ' char(ColumnS(j)) ': Press Any key to continue']) pause end disp('EP_VIEW Finished') warning on