clear all;
load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_pre-drug
x_time = ss.time(ss.unit>0)-max(ss.time);
x_unit = ss.unit(ss.unit>0);

load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_5uM-CNQX
x_time = [x_time; ss.time(ss.unit>0)];
x_unit = [x_unit; ss.unit(ss.unit>0)];

load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_wash3-4
x_time = [x_time; ss.time(ss.unit>0)+max(x_time)+15*60];
x_unit = [x_unit; ss.unit(ss.unit>0)];


%%
load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_pre-drug
%ss.ASDR(60)
x_bin = [0:60:max(ss.time)]';
x_asdr = histc(ss.time(ss.unit>0),x_bin);
%asdr = ss.asdr.asdr; bin = ss.asdr.bin-max(ss.asdr.bin)-60;
asdr = x_asdr; bin = x_bin-max(x_bin)-60;

load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_5uM-CNQX.mat
% ss.ASDR(60);
x_bin = [0:60:max(ss.time)]';
x_asdr = histc(ss.time(ss.unit>0),x_bin);
% asdr = [asdr; ss.asdr.asdr]; bin = [bin; ss.asdr.bin];
asdr = [asdr; x_asdr]; bin = [bin; x_bin];

load 2012_03_04_Lollipop-10803_Long-Term-optoBB_CNQX_00_wash3-4.mat
%ss.ASDR(60);
x_bin = [0:60:max(ss.time)]';
x_asdr = histc(ss.time(ss.unit>0),x_bin);
asdr = [asdr; x_asdr]; bin = [bin; x_bin+max(bin)+15*60];