function pH = pHPlots(SensorData, SpecpHData, pHext_tot1, pHext_tot2)
%PHPLOTS make some nice comparison plots between the sensor pH measurements
% and the spec pH measurements
pH = figure;
clf

tiledlayout(3,1)

nexttile
plot(SensorData.SampTime1,pHext_tot1)
hold on
scatter(SpecpHData.DateTime(SpecpHData.QC),SpecpHData.pH_tot(SpecpHData.QC),'filled')
ylabel('pH')
legend('mfet pH','Lab Spec pH',Location='southeast')
title('mfet')
% subtitle(['k0: ',str(round(k0_1,3)),' +/- ', str(round(k0_1_std,3)),...
%     ' mean difference: ', str(meandiffmfet)])
% add mean diff, k0, k0 std, error bars
nexttile
plot(SensorData.SampTime2,pHext_tot2)
hold on
scatter(SpecpHData.DateTime(SpecpHData.QC),SpecpHData.pH_tot(SpecpHData.QC),'filled')
ylabel('pH')
legend('nano pH', 'Lab Spec pH',Location='southeast')
title('nano')
% subtitle(['k0: ',str(round(k0_2,3)),' +/- ', str(round(k0_2_std,3)),...
%     ' mean difference: ', str(meandiffnano)])
nexttile
scatter(SensorData.SampNum1,pHext_tot1-pHext_tot2)
title('pH Residuals (mfet-nano)')
end

