function [AA]=proc3dintv3(temp1,temp2,temp3,temp4,...
    sw1,sw2,...
    nzf1,nzf2,wndend1,wndend2)
% *** 3D processing *** 
% Y. Matsuki, March, 2010
% Y. Matsuki, May, 2012
% usage:
%[AA,DA,AD,DD]=proc3dintv2(c1c2,s1c2,c1s2,s1s2,...
%    nzf1,nzf2,nzf3,sw1,sw2,sw3,ph1,ph2,ph3,on,wndend1,wndend2)
% ========================================================
% sept2509, better like this for memory use???
%             [temp1]=rrcplx3dv3(temp1,temp2);
            temp1=complex(real(temp1),real(temp2));
%              [temp3]=rrcplx3dv3(temp3,temp4);
            temp3=complex(real(temp3),real(temp4));

    temp1=sineb3dv2(temp1,90,wndend1,2);
%     temp2=sineb3d(temp2,90,wndend1,2);
    temp3=sineb3dv2(temp3,90,wndend1,2);
%     temp4=sineb3d(temp4,90,wndend1,2);

    temp1=fft(temp1,nzf1,2);
%     temp2=fft(temp2,nzf1,2);
    temp3=fft(temp3,nzf1,2);
%     temp4=fft(temp4,nzf1,2);


%             [temp1]=rrcplx3dv2(temp1,temp3);
            temp1=complex(real(temp1),real(temp3));

%     [temp3,temp4]=rrcplx3dv2(temp2,temp4);
    % 17sec

    temp1=sineb3dv2(temp1,90,wndend2,3);
%     temp2=sineb3d(temp2,90,wndend2,3);
%     temp3=sineb3d(temp3,90,wndend2,3);
%     temp4=sineb3d(temp4,90,wndend2,3);

%     AA=fft(temp1,nzf2,3);
    temp1=fft(temp1,nzf2,3);
    % mar1510, mtk.
    


AA=abs(temp1);




