% cal.m
% Sensor = SBE_10330
% DSD calibration info
cal.k2 = -1.0296E-03;
% cal.fP = flipud([-1.2138E-21	8.7851E-18	-2.5645E-14	3.8874E-11	-3.3010E-08	1.8078E-05]');
cal.fP = flipud([-1.05E-21	7.28E-18	-1.98E-14	2.68E-11	-1.89E-08	8.73E-06]');
cal.fPbad = flipud([-1.2138E-21	8.7851E-18	-2.5645E-14	3.8874E-11	-3.3010E-08	1.8078E-05  -3.0754E-03]');
% cal.k0 = -1.3888; % from HCl
% pHcal.k0 = -1.3761; % force surface to be ~8.
% pHcal.k0 = -1.4147; % from beaker work 
% cal.k0 = -1.3959; % from predeployment calibration in lab
% cal.k0 = -1.3932; % ? no idea where this comes from. 
% cal.k0 = -1.3925; % so deep pH matches validation casts 
% cal.k0 = -1.39455; % from post-calibration results
% cal.k0 = -1.39455; % !! UPDATE NEEDED WHEN GET DATA!! From Pre-calibration test tank samples on June 08 2022
% cal.k0 = -1.4056; % k0 from 20A03401. Needs to be updated with spec pH sample from June/8/2022
% cal.k0 = -1.4046; % Updated by JSL June/13/2022
cal.k0 = -1.4071; % Updated June 15 2022 -JSL found error in calcualtion code

% gain for O2
% cal.O2gain = 1.0632; % average of last 3 air-cals on 10/6/2020 
cal.O2gain = 1.0674; % air cal pre-deployment June 07 2022

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

% calibration for chl-a fluorescence. SN29 has a 30x gain on chl. 
cal.opt_offset = -0.6; 
cal.opt_gain = 0.33;

