|
|
Re: Reorganizing 2D FFT for Conventional Viewing [?] [message #4464 is a reply to message #4463] |
Thu, 22 June 1995 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <3s9jdc$dsc@ds2.acs.ucalgary.ca>, trond@smith.phys.ucalgary.ca (Trond Steinar Trondsen) writes:
> I'm trying to rearrange the 2D FFT so that zero frq is in the middle,
> and all other frqs end up in the right place. Using the Fourier shift
> theorem prior to transforming does work, but it really slows things down!
> Doing lots of loops to simply rearrange the final array takes a while
> too, and it doesn't look very nice....
> Any _elegant_ (fast) ways of doing this?
>
a = fltarr(256, 256)
b = fft(a, 1)
; b will be 256x256 with the zero frequency in the "corners"
b = shift(b, 128, 128) ; Put zero frequency in the middle
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|