function photonizer


for i=43:173
i
% %% Sortieren der Werte %%    
%     for a=1:2
%      DAv(:,a)=sort(FRET2p5mM(1,i).DAChannel(:,a));
%     end  
%     
% 
% %% Photonnummerierung %%
%     for c=1:2
%      th=0;
%      t=1;
%         while th<max(FRET2p5mM(1,i).DAChannel(:,c))
%         n = find(DAv(:,c)>th,1);    
%         FRET2p5mM(1,i).photonindex(t,c)=DAv(n,c);
%         th=FRET2p5mM(1,i).photonindex(t,c);
%         t=t+1;
%         
%         end
%     end
% 
% %%
%     clear DAv
%end
%% Umbenennen der DAChannelwert in 0,1,2,3,... %%%%%%%%%%%%%%%
   tend = size(FRET2p5mM(1,i).DAChannel,1);
    FRET2p5mM(1,i).PhotonCounts = zeros(tend,2);
    for b=2 
      for s = 1:tend
         case FRET2p5mM(1,i).DAChannel(s,b) >0;
         FRET2p5mM(1,i).PhotonCounts2(s,b) = find( FRET2p5mM(1,i).photonindex(:,b) == FRET2p5mM(1,i).DAChannel(s,b));
         case FRET2p5mM(1,i).DAChannel(s,b) >1.5;
         FRET2p5mM(1,i).PhotonCounts2(s,b) = find( FRET2p5mM(1,i).photonindex(:,b) == FRET2p5mM(1,i).DAChannel(s,b));
         case  FRET2p5mM(1,i).DAChannel(s,b)<0;    
         FRET2p5mM(1,i).PhotonCounts(s,b)=0;
        end
      end
     end
end

