function ASDR_CSDR(fid_prefix)

fpath = 'C:\Users\USER\Documents\mingfaifong_tmp\';
load([fpath fid_prefix '_nowaveform.mat']);

binsize = 30; %in seconds
binsize_label = [num2str(binsize) 'sec'];

hpr = 30; %hours per row

% ASDR
close all;
%figure('Position',[-1228 -277 1229 951]);
figure('units','normalized','outerposition',[0 0 1 1])

subplot(3,1,1);
SS.ASDR(binsize,1,0);
axis([0 hpr*3600 0 max(SS.asdr(:,2))*1.05]);
set(gca,'TickDir','out','XTick',[0:3600:hpr*3600],'XTickLabel',[0:1:hpr]);
%set(gca,'Position',[0.085 0.7331-0.2996*0 0.7750 0.1919]);
%box off;
xlabel(''); ylabel('');
text((hpr-3.5)*3600,max(SS.asdr(:,2))*.95,['binsize = ' binsize_label]);

subplot(3,1,2);
SS.ASDR(binsize,1,0);
axis([hpr*3600 (2*hpr)*3600 0 max(SS.asdr(:,2))*1.05]);
set(gca,'TickDir','out','XTick',[hpr*3600:3600:(2*hpr)*3600],'XTickLabel',[hpr:1:2*hpr]);
%set(gca,'Position',[0.085 0.7331-0.2996*1 0.7750 0.1919]);
%box off;
xlabel('');

subplot(3,1,3);
SS.ASDR(binsize,1,0);
axis([(2*hpr)*3600 (3*hpr)*3600 0 max(SS.asdr(:,2))*1.05]);
set(gca,'TickDir','out','XTick',[(2*hpr)*3600:3600:(3*hpr)*3600],'XTickLabel',[2*hpr:1:3*hpr]);
%box off;
%set(gca,'Position',[0.085 0.7331-0.2996*2 0.7750 0.1919]);
xlabel([10,'Time (hours)'],'FontSize',14); ylabel('');

print('-depsc',[fid_prefix '_ASDR_bin',binsize_label,'.eps']);
print('-dpng',[fid_prefix '_ASDR_bin',binsize_label,'.png']);
saveas(gcf,[fid_prefix '_ASDR_bin',binsize_label,'.fig'],'fig');




% CSDR

figure('Position',[-1228 -277 1229 951]);

SS.PlotCSDR({inf binsize binsize_label});

print('-depsc',[fid_prefix '_CSDR_bin',binsize_label,'.eps']);
print('-dpng',[fid_prefix 'n_CSDR_bin',binsize_label,'.png']);
% print('-dtiff',[fid_prefix '_CSDR_bin',binsize_label,'.tif']);
saveas(gcf,[fid_prefix '_CSDR_bin',binsize_label,'.fig'],'fig');

