Why so different from Matlab to matplotlib (fft2 question)?

One issue might be the use of "minAmp" and "maxAmp" in the

    > Matlab code, and no equivalent in the Python. I thought maybe
    > the vmin/vmax arguments to 'imshow' might work, but they
    > don't make much of a difference.

vmin and vmax do scale the image -- if they do not appear to make a
difference you are probably choosing improper ranges.

    > For all I know, this could be a scipy issue, and not a
    > matplotlib one, but I thought I'd start at the top and work
    > my way down.

I suggest you start at the bottom and work your way up, and inspect
the results of fftshift in matlab and scipy. imshow doesn't do all
that much, so if you are seeing big differences it is more likely in
my opinion that you are feeding in different values.

JDH

    > One issue might be the use of "minAmp" and "maxAmp" in the
    > Matlab code, and no equivalent in the Python. I thought maybe
    > the vmin/vmax arguments to 'imshow' might work, but they
    > don't make much of a difference.

vmin and vmax do scale the image -- if they do not appear to make a
difference you are probably choosing improper ranges.

vmin and vmax dont seem to have any effect on the resulting image, at least on
my machine with the most recent svn.

    > For all I know, this could be a scipy issue, and not a
    > matplotlib one, but I thought I'd start at the top and work
    > my way down.

I suggest you start at the bottom and work your way up, and inspect
the results of fftshift in matlab and scipy. imshow doesn't do all
that much, so if you are seeing big differences it is more likely in
my opinion that you are feeding in different values.

Aside from the ranges behaving strangely, something seems funny with the image
itself. He selected the grey colormap, yet there are hints of yellow in the
image.

Darren

···

On Friday 26 January 2007 11:14, John Hunter wrote: