function [Leo, FLeo]=fram3_lev_P(IND,N,dr)
ll=1;
N1=N;
J=log2(N);
J1=log2(N1);
Par=IND(2);
TS=IND(3);
Leo=zeros(3,N);
FLeo=zeros(3,N);



if TS==0
a=zeros(1,3);

a(1)=N/8;
a(2)=N/4;
a(3)=3*N/8;
for kk=1:3
    wvtr=cell(1,3);
    for nn=1:3
        wvtr{1,nn}=zeros(1,N/2);
    end
   wvtr{1,kk}(a(kk))=1;
 
  wapa  = fram34_rec_hm(wvtr,1,IND,1);
  Leo(kk,:)=wapa; %clear wvtr
 FLeo(kk,:)=abs(fft(wapa));
end

else
a=zeros(1,3);
if Par==3|Par==7
  a(1)=N/8;
a(2)=N/4;
a(3)=3*N/8;

 end


for kk=1:3
    wvtr=cell(1,3);
    for nn=1:3
        wvtr{1,nn}=zeros(1,N/2);
    end
   wvtr{1,2}(a(kk))=1;
 
 ind=[3,Par,kk];
  
  wapa   = fram34_rec_hm(wvtr,1,ind,dr);
  Leo(kk,:)=wapa; %clear wvtr
 FLeo(kk,:)=abs(fft(wapa));

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


end     




% Copyright (c) 2012. Valery A. Zheludev