%
%
%
%
%
%

%filtered seawater (FSW)
fnam_a='FSW_20130711_a1_19p2.dat';
fnam_c='FSW_20130711_c1_19p4.dat';
sal=31;
tmpa=19.2;
tmpc=19.4;


openAC9
aFSW=median(a,1)';
cFSW=median(c,1)';
[aFSW trash]=tscorr(tmpa,sal,aFSW,aFSW,19.1);
[trash cFSW]=tscorr(tmpc,sal,cFSW,cFSW,19.1);


%sample (PLAT)
fnam_a='plat_20130711_a1_22p5.dat';
fnam_c='plat_20130711_c1_22p6.dat';
tmpa=22.5; tmpc=22.6;

openAC9

aPLAT=median(a,1)';
cPLAT=median(c,1)';
[aPLAT trash]=tscorr(tmpa,sal,aPLAT,aPLAT,19.1);
[trash cPLAT]=tscorr(tmpc,sal,cPLAT,cPLAT,19.1);

aPLATc=aPLAT-aFSW;
cPLATc=cPLAT-cFSW;


figure(1)
clf;hold on;
plot(wvl,aPLATc,'g','linewidth',3)
plot(wvl,cPLATc,'r','linewidth',3)
plot(wvl,cPLATc-aPLATc,'b','linewidth',3)

legend('abs','att','scat')
