function ep_lookShutter(id, NumOfDays)
% EP_LOOKSHUTTER - Opens the files \oasis\eqpac\ep1\shutter and plots the
% shutter operations
%
% Requires: READEQPAC

% Peter Strutton
% 29 Dec 1998; Brian Schlining

% Prompt for input if no input arguments are specified
if nargin < 2 
   NumOfDays = 30;
end

% Set the path to the data file depending on what type of machine this function is run from
FileName = 'shutter';
FileLoc = fullfile(getOasisPath, 'eqpac', id, FileName);


switch lower(id)
case 'ep1'
   loc = '0 155W';
case 'ep2'
   loc = '2S 170W';
otherwise
   loc = [];
end

X    = readeqpac(FileLoc, NumOfDays);
fig1 = figure;
set(fig1,'Name','Shutter diagnostics')
plot(X(:,1),X(:,2:9))
legend('Operations','Open attempts', 'Close attempts', 'Total errors', 'Timeouts', 'Collisions', 'Redundants', 'Oasis errors',0);
ylabel(['Shutter diagnostics at ' loc]);
xlabel('Date');
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end

datetick('x',dtick)
setfontsize(7)
