% cd('G:\ming\2013-01-21_trouble22467_12-14DIV_MEA_CNQX');
% 
% %% Wavelet Approach
% clear all;
% spkdat = load('trouble22467_waveforms_12-14DIV.mat');
% SS = SqueakySpk('trouble22467_12-14DIV_WaveletSort_Custom',25000,1,spkdat);
% SS.WaveClus(4,200,'wav',0,0);
% SS.Save;
% 
% 
% %% PCA Approach
% clear all;
% spkdat = load('trouble22467_waveforms_12-14DIV.mat');
% SS = SqueakySpk('trouble22467_12-14DIV_PCASort_Custom',25000,1,spkdat);
% SS.WaveClus(4,200,'pca',0,0);
% SS.Save;
% 
% %%
% cd('G:\ming\2013-01-21_trouble22468_12-14DIV_MEA_CNQX-ChR2-stim-CL');
% 
% %% Wavelet Approach
% clear all;
% spkdat = load('trouble22468_waveforms_12-14DIV.mat');
% SS = SqueakySpk('trouble22468_12-14DIV_WaveletSort_Custom',25000,1,spkdat);
% SS.WaveClus(4,200,'wav',0,0);
% SS.Save;
% 
% 
% %% PCA Approach
% clear all;
% spkdat = load('trouble22468_waveforms_12-14DIV.mat');
% SS = SqueakySpk('trouble22468_12-14DIV_PCASort_Custom',25000,1,spkdat);
% SS.WaveClus(4,200,'pca',0,0);
% SS.Save;
% 
% 
% 
% 
% 
% 
% clear all;
% 
cd('G:\ming\2013-01-26_vivy21369_10-13DIV_6well\');

dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369A_10-12DIV';
spkdat = load([fid '_waveform.mat']);
% SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
% SS.Save;
% 
% SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
% SS.WaveClus(4,200,'wav',0,0);
% SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;

%%


dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369B_10-12DIV';
spkdat = load([fid '_waveform.mat']);
SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
SS.Save;

SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
SS.WaveClus(4,200,'wav',0,0);
SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;

%%
dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369C_10-12DIV';
spkdat = load([fid '_waveform.mat']);
SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
SS.Save;

SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
SS.WaveClus(4,200,'wav',0,0);
SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;

%%
dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369D_10-12DIV';
spkdat = load([fid '_waveform.mat']);
SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
SS.Save;

SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
SS.WaveClus(4,200,'wav',0,0);
SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;

%%
dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369E_10-12DIV';
spkdat = load([fid '_waveform.mat']);
SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
SS.Save;

SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
SS.WaveClus(4,200,'wav',0,0);
SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;

%%
dirID = 'G:\ming\2013-01-26_vivy21369_10-13DIV_6well\';
fid = 'vivy21369F_10-12DIV';
spkdat = load([fid '_waveform.mat']);
SS = SqueakySpk([fid '_DoublePeakSortNR'],25000,1,spkdat);
SS.Save;

SS = SqueakySpk([fid '_WaveletSort'],25000,1,spkdat);
SS.WaveClus(4,200,'wav',0,0);
SS.Save;

SS = SqueakySpk([fid '_PCASort'],25000,1,spkdat);
SS.WaveClus(4,200,'pca',0,0);
SS.Save;