load data2IQ1_1.txt
load data2IQ1_2.txt
load data2IQ1_3.txt
load data2IQ1_4.txt
load data2IQ1_5.txt

xydim=64;, p=xydim^2;, n=272;, zdim=5;

dataxy1=zeros(xydim^2,2,n);
dataxy2=zeros(xydim^2,2,n);
dataxy3=zeros(xydim^2,2,n);
dataxy4=zeros(xydim^2,2,n);
dataxy5=zeros(xydim^2,2,n);
for count2=1:n
   for count1=1:xydim^2
      dataxy1(count1,1:2,count2)= data2IQ1_1(count1+xydim^2*(count2-1),1:2);
      dataxy2(count1,1:2,count2)= data2IQ1_2(count1+xydim^2*(count2-1),1:2);
      dataxy3(count1,1:2,count2)= data2IQ1_3(count1+xydim^2*(count2-1),1:2);
      dataxy4(count1,1:2,count2)= data2IQ1_4(count1+xydim^2*(count2-1),1:2);
      dataxy5(count1,1:2,count2)= data2IQ1_5(count1+xydim^2*(count2-1),1:2);
   end
end
clear data2IQ1_1 data2IQ1_2 data2IQ1_3 data2IQ1_4 data2IQ1_5

i=sqrt(-1);
Ycomp1=zeros(n,p)+i*10^(-10)*ones(n,p);
Ycomp2=zeros(n,p)+i*10^(-10)*ones(n,p);
Ycomp3=zeros(n,p)+i*10^(-10)*ones(n,p);
Ycomp4=zeros(n,p)+i*10^(-10)*ones(n,p);
Ycomp5=zeros(n,p)+i*10^(-10)*ones(n,p);
for countp=1:p
    for countn=1:n
        Ycomp1(countn,countp)=dataxy1(countp,1,countn)+i*dataxy1(countp,2,countn);
        Ycomp2(countn,countp)=dataxy2(countp,1,countn)+i*dataxy2(countp,2,countn);
        Ycomp3(countn,countp)=dataxy3(countp,1,countn)+i*dataxy3(countp,2,countn);
        Ycomp4(countn,countp)=dataxy4(countp,1,countn)+i*dataxy4(countp,2,countn);
        Ycomp5(countn,countp)=dataxy5(countp,1,countn)+i*dataxy5(countp,2,countn);
    end
end
clear dataxy1 dataxy2 dataxy3 dataxy4 dataxy5

Ycomp=zeros(xydim,xydim,zdim,n);
Ycomp(:,:,1,:)=reshape(Ycomp1',xydim,xydim,n);
Ycomp(:,:,2,:)=reshape(Ycomp2',xydim,xydim,n);
Ycomp(:,:,3,:)=reshape(Ycomp3',xydim,xydim,n);
Ycomp(:,:,4,:)=reshape(Ycomp4',xydim,xydim,n);
Ycomp(:,:,5,:)=reshape(Ycomp5',xydim,xydim,n);

clear Ycomp1 Ycomp2 Ycomp3 Ycomp4 Ycomp5
clear  count1 count2 countn countp i p

yRU=real(Ycomp); yIU=imag(Ycomp);

save('RL_data2IQ1_YRU','yRU')
save('RL_data2IQ1_YIU','yIU')

ft=1
if ft==1%
    YcompFilt=zeros(xydim,xydim,zdim,n);
    for countz=1:zdim
        for countx=1:xydim
            for county=1:xydim
                temp1=zeros(n,1); temp2=zeros(n,1);
                temp=squeeze(fft(Ycomp(countx,county,countz,:),n));
                temp1=real(temp); temp2=imag(temp);
                clear temp
                for counting=2:7
                    temp1(counting,1)=0; temp1(n+2-counting,1)=0; temp2(counting,1)=0; temp2(n+2-counting,1)=0;
                end
                for counting=51:87
                    temp1(counting,1)=0; temp1(n+2-counting,1)=0; temp2(counting,1)=0; temp2(n+2-counting,1)=0;
                end
                tempft=temp1+sqrt(-1)*temp2;
                YcompFilt(county,countx,countz,:)=ifft(tempft,n);
            end
        end
    end
%     figure;
%     plot(abs(fftshift(tempft)))
%     ylim([0,.1*max(abs(tempft))]), xlim([0,n])
    
    clear tempft temp1 temp2 temp
end%

yRF=real(YcompFilt); yIF=imag(YcompFilt);

save('RL_data2IQ1_YRF','yRF')
save('RL_data2IQ1_YIF','yIF')








