%% O2_calibration.m : to get calibration data for SeaBird 43 O2 sensors
%% inputs is sensor serial number 
%%  Choose calibration nearest in time to mission by uncommenting/commenting out
%% SOc and BOc are the only coefficients that change with time; all others differ between sensors
function [O2_offset, Tcor, Pcor, SOc, BOc] = O2_cal_SBE43(O2serial);

if O2serial==50;
 disp('   Oxygen sensor SN 50');
 %% O2 offset, Tcor and Pcor
 O2_offset = -0.6147; Tcor = 0.0007;  Pcor = 1.500e-04;
 %% For oxygen calculation, need coefficients oxygen current bias and slope
 SOc = 0.3006; BOc = 0.0028;

elseif O2serial==103;
 disp('   Oxygen sensor SN 103');
 %% O2 offset, Tcor and Pcor
 O2_offset = -0.6339; Tcor = 0.0015;  Pcor = 1.350e-04;
 %% For oxygen calculation, need coefficients oxygen current bias and slope
 SOc = 0.3496; BOc = 0.0045;

else
 disp(['Error: Unknown Oxygen Sensor Serial Number']); return
end
