Real and Imaginary parts of Fourier transforms compared to Matlab/python
simon.wall
The program should take a Fourier transform of a 2D image (the data is actually a hologram). When I compare the magnitude images with those from Matlab/python, they agree well. However, when I look at the real/imaginary parts the are completely scrambled. The values oscillate from very negative to very positive in the space of one pixel. I am guessing that this must be something to do with the phase fluctuating between pi and -pi, however, I could't seem to figure out a way to stop it.
Is there something stupid that I am doing? With matlab/python the real and imaginary parts look fine without having to do anything tricky.
March 8, 2017 at 10:04 am - Permalink
DisplayHelpTopic "FFT Amplitude Scaling"
already?March 8, 2017 at 10:30 am - Permalink
March 8, 2017 at 02:26 pm - Permalink
1. your transform on that "other program" may not use symmetry or does not center the results.
2. depending on the program and the dimensions of the image there may be padding involved.
3. If your input is a square array try a rectangular array (different dimension) to make sure that you are not switching between row-major/column major.
March 8, 2017 at 05:46 pm - Permalink
A very useful Example file for you to look at is "FFT Swapping Demo.pxp", found in the Examples directory or via the main File->Example Experiments->analysis route.
The consequence of a translation (co-ordinate offset) in direct space is a large linearly varying phase shift in Fourier space, which sounds like what you are reporting.
March 9, 2017 at 06:16 am - Permalink