% Jon Newman
% Ga Tech

% 30 May 2010

% Look at ISI distributions

tankID = 'C:\TempData\20100420\20100420-25';
[directory file] = queryfid(tankID);
fid = strcat([directory '\' file]);
load(fid);

spktime = data.extrarec.spiketime;
isi = diff(data.extrarec.spiketime);
isi = isi(isi<1);

%%
[counts bins] = hist(isi,200);
[ASDR ASbins] = asdr(spktime);

figure()
subplot(2,2,1:2)
plot(ASbins,ASDR,'k')
xlabel('ASDR (Hz)')
ylabel('Time')
subplot(2,2,3)
semilogy(bins, counts/sum(counts),'k', 'LineWidth',2)
xlabel('ISI (sec)')
ylabel('Count')