
clear;
figure(1);

drc = '../exp_data/090914/090914.';
for i = 1:16
    dat_f = num2str(2*i-2, '%03d');
    dat_fnm = [drc, dat_f]
    dat1 = dlmread(dat_fnm, ' ', [7 0 14 41]);
    ch_cnt1 = sum(dat1');
    dat_f = num2str(2*i-1, '%03d');
    dat_fnm = [drc, dat_f];
    dat2 = dlmread(dat_fnm, ' ', [7 0 14 41]);
    ch_cnt2 = sum(dat2');
    if mod(i, 2) == 1
        ch_cnt(i,:) = [ch_cnt1, ch_cnt2];
    else
        ch_cnt(i,:) = [ch_cnt2, ch_cnt1];
    end
end

for i = 1:16
    subplot(4,4,i);
    %hist(ch_cnt(i,:), [1:16]);
    plot([1:16], ch_cnt(i,:), 'rs','MarkerSize',4);
    xlim([1 16]);
    %h = findobj(gca,'Type','patch');
    %set(h,'FaceColor','r','EdgeColor','w')
    title(['Beam --> Ch', num2str(i, '%02d')]);
    %xlabel('ch');
    %ylabel('Count');

end

