function [PRES, TC] = calc_paros_pres(pres_period, temp_period, pres_serialnum);
%% To calculate pressure using the serial number of the paroscientific pressure sensor
%% the pressure period and the temperature period


      [pu0, py1, py2, py3, pc1, pc2, pc3, pd1, pd2, pt1, pt2, pt3, pt4, pt5] = ...
           Pres_cal(pres_serialnum);
       pu = temp_period-pu0;
       pc = pc1 + pc2*pu + pc3*(pu.^2);
       pd = pd1 + pd2*pu;
       pt0 = pt1 + pt2*pu + pt3*(pu.^2) + pt4*(pu.^3) + pt5*(pu.^4);
       pres = pc.*(1-((pt0.^2)./(pres_period.^2))).* ...
           (1-pd.*(1-((pt0.^2)./(pres_period.^2))));  % (in psi)
       PRES = pres * 0.06894757;  % (in bars)

       TC = py1*pu + py2*(pu.^2) + py3*(pu.^3);  % (in degrees C)


