% Walmart, kalmazoo michigan, july4th holiday, ?1995?

l1=0    % begin frame
l2=186  % end frame (there are 187 frames numbered 0 to 186)
err_history=[]; p=[];

%%%%for l = l1+1:l2   % pairwise of frames l1..l2-1 with l1+1..l2
disp('starting at image 100 where left off last time')
for l = 99+1:l2 %% REPLACE WITH ABOVE LINE LATER

  A = eval(sprintf('loadframe(%d)',l-1));
  figure(1);  % keep from running out of memory (limit fig use)
  B = eval(sprintf('loadframe(%d)',l));
  disp(sprintf('--- estimating translation frame 0 to %d',l))
  p_trans=est_trans_fft2(A,B); % now takes B to A
  p_now=est_pchirp2m(A,B,9,3,p_trans,1);
  p=[p;p_now]; % concatenate each time
  mse=mean2nan(abs(A-pchirp2(p_now,B)));
  err_history=[err_history;mse];
  s = sprintf('save parameters_pairwisem_100_onwards_9_3_%03d p err_history',l);
  disp(s)
  eval(s)
end%for

