comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL 5.5, 2D FFT indexing confusion.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL 5.5, 2D FFT indexing confusion. [message #44821] Tue, 19 July 2005 13:49 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Pitufa" <c.c.calderon@gmail.com> wrote in message
news:1121772201.952005.96070@g43g2000cwa.googlegroups.com...
> Hi,
>
> I have been trying to generate an real even function in fourier space
> that I can INVERSE FFT in order to get a function which has no
> imaginary part. I have no problems when the function is a vector, but I
> get an imaginary part when it is a two dimensional array.
...

Hello Pitufa,
I shrunk the size of the array and took a look.
I think your nyquist rows and columns should all be positive (i.e. don't
flip the signs).
(by nyquist rows/columns i mean the npix/2+1 columm and the npix/2+1 row)

Here is a npix=6 example that i fixed
f = [ $
[0.00, 0.00, 0.00, 0.00, 0.00, 0.00],$
[0.00, 1.00, 0.80, 0.60, -0.80, -1.00],$
[0.00, 0.80, 1.00, 0.92, -1.00, -0.80],$
[0.00, 0.60, 0.92, 1.00, 0.92, 0.60],$
[0.00,-0.80, -1.00, 0.92, 1.00, 0.80],$
[0.00,-1.00, -0.80, 0.60, 0.80, 1.00] $
]

Cheers,
bob

PS
Note that if your "npix" is odd, you have both a positive and negative
nyquist points
and they are both complex.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: % Error in ZLIB compression library - data error. Unit: 100, File: /home/mathieu/Projects/FarSight/Documentation/idldoc/idldoc.sav
Next Topic: Strange behaviour of format

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:22:37 PDT 2025

Total time taken to generate the page: 0.00476 seconds