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 #44916 is a reply to message #44821] Thu, 21 July 2005 10:28 Go to previous message
Pitufa is currently offline  Pitufa
Messages: 8
Registered: July 2005
Junior Member
Thanks Bob!

I tried what you told me and it seemed to work, although I am not
totally sure why..

I agree, everything becomes much simpler if N is odd, since the range
of frequencies is symmetric (taking centre as (npix - 1)/2.d and nshift
as (npix - 1)/2 +1).

I tried to understand how it can work with an even N, and got the
following conditions:
1. F_{m,p} = F_{N-m,N-p}*
2. F_{m,N} = F_{N-m,N}*
3. F_{N,p} = F_{N,N-p}*
4. F_{N,N} = F_{N/2-1,N/2-1}*
5. F_{N,N/2-1} = F_{N/2-1,N}*

but then it only works if the fourier array is real, and 2-5 don't make
any sense physically! My conclusion from this is that you are better
off using an odd N if you are doing this sort of calculation.

Agree? Disagree?

Why the nyquist rows/columns need to be positive?

Thanks alot,

Pitufa.

R.G. Stockwell wrote:
> "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: Sun Oct 12 08:41:57 PDT 2025

Total time taken to generate the page: 0.72010 seconds