Give names to the columns of SES data.

dateTime=1;
darkRefIntTime=2;
darkRef690=3;
darkRef590=4;
measureRefIntTime=5;
measureRef690=6;
measureRef590=7;
luminIntTime=8;
lumin690=9;
lumin590=10;
fluorIntTime=11;
fluor690=12;
fluor590=13;
phosIntTime=14;
phos690=15;
phos590=16;

Import data from calibration file.

data=Drop[Import["/Volumes/ProjectLibrary/901027.SedimentationEventSensor/Data\ Analysis/Fluorometer\ Calibration/test-tank/calibration\ 10\ thru\ 17.csv"],1];

Grid[data[[1;;10]]]

data[[All,{dateTime,fluor690-measureRef690,fluor590-measureRef590}]]

data690=Flatten[data[[All,fluor690]]-data[[All,measureRef690]]]

data590=Flatten[data[[All,fluor590]]-data[[All,measureRef590]]]

ListPlot[{data690,data590},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

Pick out just the 1 second integration data, and reorder it starting from leaf, to 100%, and down to 0%

data690int1s=data690[[{5,6,7,9,10,11,39,40,41,15,16,17,21,22,23,27,28,29,33,34,35,1,2,3}]]

data590int1s=data590[[{5,6,7,9,10,11,39,40,41,15,16,17,21,22,23,27,28,29,33,34,35,1,2,3}]]

ListPlot[{data690int1s,data590int1s},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

Find the mean of each set of 3 measurements.

data690int1smean=Map[Mean,Partition[data690int1s,3]]

data590int1smean=Map[Mean,Partition[data590int1s,3]]

ListPlot[{data690int1smean,data590int1smean},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

ListPlot[{Drop[data690int1smean,2],Drop[data590int1smean,2]},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

Now pick out the 2 second integration data, and reorder it as before. Note that the leaf and 0% targets had only one measurement each, so the values have to be repeated three for consistent format.

data690int2s=data690[[{8,8,8,12,13,14,42,43,44,18,19,20,24,25,26,30,31,32,36,37,38,4,4,4}]]

data590int2s=data590[[{8,8,8,12,13,14,42,43,44,18,19,20,24,25,26,30,31,32,36,37,38,4,4,4}]]

ListPlot[{data690int2s,data590int2s},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

data690int2smean=Map[Mean,Partition[data690int2s,3]]

data590int2smean=Map[Mean,Partition[data590int2s,3]]

ListPlot[{data690int2smean,data590int2smean},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

ListPlot[{Drop[data690int2smean,2],Drop[data590int2smean,2]},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

Manipulate[Plot[GaussianWindow[x,sigma],{x,0,1},PlotRange->All],{sigma,0.1,1}]

Reorder the data from 0 % to 100% and rescale so what was 80% is now 100%. The old 100% was bigger than the view aperature of the fluorometer and so those data should be dropped. This will give us a new scale of 0%, 25%, 50%, 75%, and 100%.

data690reord=data690[[{1,2,3,33,34,35,27,28,29,21,22,23,15,16,17}]]

data590reord=data590[[{1,2,3,33,34,35,27,28,29,21,22,23,15,16,17}]]

ListPlot[{data690reord,data590reord},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic]

data690reomean=Map[Mean,Partition[data690reord,3]]

data590reomean=Map[Mean,Partition[data590reord,3]]

ListPlot[{data690reomean,data590reomean},PlotRange->All,PlotLegends->{690 nm,590 nm},Filling->Axis,GridLines->Automatic,DataRange->{0,100}]

Create a list of pairs where the first element is the mean of the three samples and the second element is the standard error of the mean (SEM).

data690meanerr=Partition[data690reord,3]

data690meanerr={Mean[#],StandardDeviation[#]}&/@Partition[data690reord,3]

data690meanerr={Mean[#],StandardDeviation[#]/Sqrt[3]}&/@Partition[data690reord,3]

data590meanerr={Mean[#],StandardDeviation[#]/Sqrt[3]}&/@Partition[data590reord,3]

Needs["ErrorBarPlots`"]

ErrorListPlot[{data690meanerr,data590meanerr},PlotRange->All,PlotLegends->{690 nm,590 nm},GridLines->Automatic,Joined->True,DataRange->{0,100}]

ErrorListPlot[{data690meanerr,data590meanerr},PlotRange->All,PlotLegends->{690 nm,590 nm},GridLines->Automatic,Joined->True,Frame->True,FrameLabel->{{"Fluorometer Response (counts)",""},{"Calibration Target Area","SES Fluorometer Calibration"}}]

Define the actual areas of the target disks in (cm^2) as measured by Crissy with ImageJ.

areas={0,1.00,1.98,3.01,4.02}

Generate new lists with the mean, error, and the area.

data690meanerr

data690meanarea=Partition[Riffle[areas,data690reomean],2]

data690meanareaerr=Partition[Riffle[data690meanarea,ErrorBar[StandardDeviation[#]/Sqrt[3]]&/@Partition[data690reord,3]],2]

data590meanarea=Partition[Riffle[areas,data590reomean],2]

data590meanareaerr=Partition[Riffle[data590meanarea,ErrorBar[StandardDeviation[#]/Sqrt[3]]&/@Partition[data590reord,3]],2]

ErrorListPlot[{data690meanareaerr,data590meanareaerr},PlotRange->All,PlotLegends->{690 nm,590 nm},GridLines->Automatic,Joined->True,Frame->True,FrameLabel->{{"Fluorometer Response (counts/s)",""},{"Calibration Target Area ((cm^2))","SES Fluorometer Calibration"}}]

ErrorListPlot[{Drop[data690meanareaerr,-1],Drop[data590meanareaerr,-1]},PlotRange->All,PlotLegends->{690 nm,590 nm},GridLines->Automatic,Joined->True,Frame->True,FrameLabel->{{"Fluorometer Response (counts/s)",""},{"Calibration Target Area ((cm^2))","SES Fluorometer Calibration"}}]