function outFRET=gammacalc(inFRET,where)
if nargin<2
    where=1
else
end
outFRET=inFRET;
for k=1:length(inFRET)

tA=inFRET(1,k).A_bleached;
tD=inFRET(1,k).D_bleached;
t_Dsolo=tD-tA;

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



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