On 05/16/2013 08:50 PM, Andrei Malashevich wrote:

> So it looks that by doing FFT and inverse FFT did not return the 
> original function.
> I understand that my function rho(z) is not realistic and has a huge 
> discontinuity but I thought that it should not really matter for this 
> FFT test.
> At least when I took a similar function in 1D, and did FFT and inverse 
> FFT in my python script I got my original function back.
>

The fourier transforms are:
CALL fwfft ('Dense', psic, dfftp)
CALL invfft ('Dense', psic, dfftp)


The other lines in the code snip you pasted have nothing to do with the 
fourier transform; they are a re-shuffling of the order of the plane waves.

That said, the noise in "after" looks like a typical  example of 
aliasing. Like here: <http://en.wikipedia.org/wiki/File:SquareWave.gif>

bests


-- 
Dr. Lorenzo Paulatto
IdR @ IMPMC -- CNRS & Universit? Paris 6
phone:+33 (0)1 44275 084 / skype: paulatz
www:  http://www-int.impmc.upmc.fr/~paulatto/
mail: 23-24/4?16 Bo?te courrier 115, 4 place Jussieu 75252 Paris C?dex 5

Reply via email to