module OW_image_plane
!
! Imaging Condition -- crosscorrelation
!

use OW_type
use OW_parms_areal

implicit none

contains
!----------------------------------------------------------
subroutine owimage(ws,wr,GG) 

integer					:: ish, ihso, ixw,iw
complex					:: GG(:,:),wr(:),ws(:)

do ish=1,img%sh%n
   ihso=nint(((ish-1)*img%sh%d+img%sh%o)/(img%xm%d))
   do ixw=1,nxcut
      if (ixw-ihso > 1 .and. ixw-ihso < nxcut .and. ixw+ihso > 1 .and. ixw+ihso < nxcut) then
          GG(ish,ixw)=GG(ish,ixw)+conjg(ws(ixw-ihso))*(wr(ixw+ihso))!*(cmplx(0,rec%w%all(iw)))
      end if
   end do
end do

end subroutine

end module
