ConditionScienceData

% -----------------------------------------------------------------
% Work with spikes in data...

i = 4
switch i
    case 1
        s = chl;
        t = tchl;
        ds = interp1(td, d, t);
        name = 'Chlorophyll Fluorescence';
    case 2
        s = s470;
        t = ts470;
        ds = interp1(td, d, t);
        name = 'Optical backscatter at 470nm';
    case 3
        s = s680;
        t = ts680;
        ds = interp1(td, d, t);
        name = 'Optical backscatter at 680nm';
    case 4
        s = o2;
        t = to2;
        ds = interp1(td, d, t);
        name = 'Optical backscatter at 680nm';
end

% ---------------------------------------------------

N = 9;
s_std = running_std(s,N);
s_n = (s./s_std).^2;
s_pb = s./s_n;

%...parameter plot
scatter(t, ds, 5, log10(s), 'o', 'filled');
colorbar; set(gca,'YDir','reverse'); %caxis([0 0.005]);
title(name);
xlabel('Time (s)'); ylabel('Depth in Meters');

%...particle brightness
scatter(t, ds, 5, log10(s_pb), 'o', 'filled');
colorbar; set(gca,'YDir','reverse'); %caxis([0 0.005]);
title([name 'Particle Brightness']);
xlabel('Time (s)'); ylabel('Depth in Meters');
caxis([-4 0.5]);

%...particle number
scatter(t, ds, 5, log10(s_n), 'o', 'filled');
colorbar; set(gca,'YDir','reverse'); %caxis([0 0.005]);
title([name 'Particle Number']);
xlabel('Time (s)'); ylabel('Depth in Meters');
caxis([0 4.5]);

%...Chl ploted in pb vs n space
scatter(log10(chl_n), log10(chl_pb), 3, log10(chl), 'o', 'filled')

scatter(log10(chl_n), log10(chl_pb), 3, log10(s1), 'o', 'filled')

