% projective prolet

disp('Takes about 54 minutes to do NW=12 (24 calcs) on a Decstation 5000/200')
disp('could speed up by not interpolating for the zeros')

begtime = fix(clock)

NW = 12;

M = 100;    % size of final output image
N = 100;

if ~exist('V')
  [V d] = slepian(200,NW);
end%if

SS_projx = zeros(M,N);   % size of image to be 100 by 100
x = linspace(-1,1,600).';
xproj = project(x+1.34,pi/4,1,2); % 1.34 chosen to keep within [-1,1] and get 
                                  % projlet close to center

for nw     = 1:2*NW   % only bother with the big fish
  s_part   = V(:,nw); % slepian is one column of V
  s        = [zeros(s_part);s_part;zeros(s_part)];
  disp(sprintf('%g  <---------------------------- PROJECTING SLEPIAN %g',nw,nw))
  s_projx = interp2(x(:),s(:),xproj(:));  % interpolate new projected pts
  SS_temp  = tf(s_projx,M,N);
  SS_projx = SS_projx + SS_temp.*conj(SS_temp);  % must use SQR magnitude
end%for

endtime = fix(clock)
disp('took this much time to generate the one projected prolet:')
endtime-begtime

disp('now about to display the projected prolet')
dispmatb(SS_projx)

