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.
|