%timer
NumPhotons = 1000000;
tic
counter = 0;
for i= 1:NumPhotons
   if toc>counter
      disp([num2str(counter/60),' minutes elapsed  i=',num2str(i),' of ',num2str(NumPhotons)]);
      counter=counter+10;
   end
end
