2d FFT unwrap routine


wrice
10-28-2003, 03:14 PM
I'm looking for a f77 routine to unwrap (for display) a 2d image FFT transform created by FOURN (Figs 12.2.2 & 12.4.1 in NumRec f77 doc).

Here's what I've tried:

subroutine unwrap(ix,iy,iix,iiy)
c
c nx,ny -- image size
c ix,iy -- position in FOURN Transform array
c iix,iiy -- unwrapped position
c
common/param/ nx,ny
c
iiy = ny/2+iy
if(iy.gt.ny/2) iiy = iy-ny/2
c
iix = nx/2+ix
if(ix.gt.nx/2) iix = ix-nx/2
return
end