
fid = 'test';
s = loadspk([fid '.spk'],[0 1000]);
b = loadbang([fid '.bang']);


ss = SqueakySpk('test00.spk',s.meta.fs_Hz,1,s);
% bc = setdiff(1:64,[3 4 5 12 13 20 21 28 29]);
% ss.RemoveChannel(bc);

% Check sum
spk = ss.ReturnClean();
n1 = numel(spk.time);
n2 = sum(b.meas(b.time < 1000))/b.meta.loop_hz;


disp(['N_spk true: ' num2str(n1)])
disp(['N_spk det.: ' num2str(n2)])




