[Numpy-discussion] Horizontal lines in diffraction image (NumPy FFT)

Anne Archibald peridot.faceted@gmail....
Sat Aug 9 16:10:41 CDT 2008


2008/8/8 Matthias Hillenbrand <mailanhilli@googlemail.com>:

> My Gaussian beam and the lenses have a diameter of approximately 2^16
> array elements while the total array has a size of 2^18. The absolute
> value of the Gaussian beam multiplied by the lenses converges to zero.
> Out of this reason I assume that zero padding is not the reason for
> the horizontal lines. I also inreased the amount of zero padding by
> the factor of 4 but the horizontal lines were still present. Could
> something like a difference in the calculation precision (complex
> numbers) be the reason for the difference between Octave and Numpy?

Your code is fairly complicated, and just looking at it I don't see a
reason for there to be a difference between Octave and Numpy. But here
are some things you could try:

* run numpy.test() and make sure numpy passes all tests
* follow each fft with an inverse fft and compare with the input
* print out the input and output arrays and compare them visually
* save the input array to fft from each script and compare the ffts
using both tools
* email the list with a minimal example: an array (preferably small)
whose fft is different in Octave and numpy

Good luck,
Anne


More information about the Numpy-discussion mailing list