
%%
volume_L4C = 0.9;   % [L] From G1000561, pg 15
torr_per_kPa = 7.5; % [torr/kPa] From the googs
time = 2.62974e6; % [sec] = 1 [month]; From the googs.

month = [5:10]; % [month] Starting May 2014 through Oct 1 2014

pressure_kPa = [97.423 98.956 98.86;...  % [kPa]
                97.358 98.910 98.771;... % Taken from 
                97.288 98.820 98.710;...
                97.199 98.734 98.573;...
                97.110 98.665 98.526;...
                97.026 98.568 98.369];
        
pressure_torr = pressure_kPa * torr_per_kPa;

%%
for iMonth = 1:(length(month)-1)
    for iPod = 1:3
        leakRate(iMonth,iPod) = (pressure_torr(iMonth,iPod) - pressure_torr(iMonth+1,iPod))*volume_L4C/time;
    end
end

%%
figure(2)
ll = plot(month(1:end-1),leakRate*1e6);
xlabel('Time [months]')
ylabel('Leak Rate [\mu torr.Liter/sec]','Interpreter','TeX');
title({'2014-May to 2014-Oct H1 ISI ETMY, L4C Pod Leak Rate';...
       'Converted Absolute Pressure Sensor Readings'});
legend('L4C Pod 1','L4C Pod 2','L4C Pod 3','Location','NorthEast')  
set(gca,'XTick',5:9)

if printFigs
    FillPage('w')
    IDfig(', J. Kissel')
    saveas(gcf,'~/2014-10-09/2014-10-09_H1ISIETMY_L4CPod_LeakRate.pdf')
end