function [pk,pki] = parpks(pa,pb,pc,pd,pe)
% [pk,pki] = parpks(pa,pb,pc,pd,pe)
[m n] = size(pa);
pk = zeros(m,n);

index = 0;
for i1 = 1:m
  for j1 = 1:n
    paval = pa(i1,j1);
    pbval = pb(i1,j1);
    peval = pe(i1,j1);
    pcval = pc(i1,j1);
    pdval = pd(i1,j1);
    if pa(i1,j1)<0 & pb(i1,j1)<0 ...
       & abs(paval) > 0.01 & abs(pbval) > 0.01 ...
       & abs(paval)+abs(pbval)>1.2 ...
       & sqrt(pcval*pcval+pdval*pdval)<0.9
      pk(i1,j1) = 255;
      index = index+1;
      pki(index,1) = i1;
      pki(index,2) = j1;
    end
  end
end
