function outFRET=gammacor(inFRET)
outFRET=inFRET;
for k=1:length(inFRET)
 nonZD=find(unFRET(1,i).counts(:,1));
 DchancesPseudo_gamma=rand(length(nonZD),1);
 del_pseudo_gamma=DchancesPseudo_gamma<unFRET(1,i).cross;
tA=inFRET(1,k).A_bleached;
tD=inFRET(1,k).D_bleached;
t_Dsolo=tD-tA;

ID_Dsolo=sum(inFRET(3,k).counts(tA:tD,1));
IA_Dsolo=sum(inFRET(3,k).counts(tA:tD,2));



pseudo_gamma1=((ID_Dsolo+IA_Dsolo)/t_Dsolo)/(sum(sum(inFRET(3,k).counts(1:tA,1:2)))/tA);
pseudo_gamma2=((ID_Dsolo+IA_Dsolo)/t_Dsolo)/(sum(sum(inFRET(3,k).counts(tA-500:tA,1:2)))/500);
outFRET(1,k).psG1=pseudo_gamma1;
outFRET(1,k).psG2=pseudo_gamma2;
end