function DAint=cleaneff(DACor)

length = size(DACor,1);
DAclean = zeros(length,2);
DAint = zeros(length,2);
twindow=20;
for i=1:length
    if DACor(i,1)>0 
    DAclean(i,1)=DACor(i,1);
    elseif  DACor(i,2)>0
    DAclean(i,2)=DACor(i,2);
    else
    DAclean(i,1:2)=0;
    end
end

for i=1:length-twindow
DAint(i+twindow/2,1)=sum(DAclean(i:i+twindow,1));
DAint(i+twindow/2,2)=sum(DAclean(i:i+twindow,2)); 
DAint(i,3) = DAint(i,2)/(DAint(i,1)+DAint(i,2));
end