% cal.m
% Contains calibration coefficients for Spray Glider RT processing
%
% Date Logged: May 16 2022
% Logger: Jacki Long 


% DSD calibration info
cal.k2 = -1.07e-03; %Last updated 1310PST March 15 - JSL
% cal.k2 = -1.2e-3;
% cal.fP = flipud([0, 0, 0, 1.325543E-12, -3.904319E-9, -1.765035E-6]'); % 3rd order polynomial
% cal.fP = flipud([0, 0, 0, 0, 0, 2.188E-06]'); % linear function, decreasing P only, above 1000 m
cal.fP = flipud([-1.21E-21, 8.79E-18, -2.56E-14, 3.89E-11, -3.30E-08, 1.81E-05]'); %Updated 1310PST March 15 - JSL
% cal.k0 = -1.4217; % made up right now
% cal.k0 = -1.39306; %Updated 1310PST March 15 (just after deployment) - JSL
cal.k0 = -1.3918; %Updated 1058 PST by using all deep dives (currently are all near M1) to re-calc from k0frompH function (called in "RT_recalc_k0.m") - JSL
 
% Enter gain for O2 correction from pre-deployment set up
% cal.O2gain = 270/235; % from eyeballing surface O2 from glider and BOG from a month ago
% cal.O2gain = 1.2097; 
% new gain calculated from pre-deployment air cal
% cal.O2gain = 1.0511 ; 
% cal.O2gain = 1.01749; %Copied from previous SG34 deployments -JSL Mar 07 2022
cal.O2gain = 1.0506; % From predeployment air cal on March 09 2022

cal.psal_offset = 0; % constant offset, based on comparison to validation casts

% calibration for chl-a fluorescence
cal.opt_offset = -0.6; 
cal.opt_gain = 1.4637;



