From: Jay Parlar <parlar@gm...>  20070126 16:08:18

I'm trying to learn about 2D fourier transforms and kspace right now. To do this, I'm using the image at http://django.jayparlar.com/4kSnake.png In Matlab, I run the following code: Im = double(imread('4kSnake.png')); FT = fftshift(fft2(Im)); FT_Amp = abs(FT); minAmp = min(min(FT_Amp)); maxAmp = max(max(FT_Amp)); colormap gray; imagesc(FT_Amp,[minAmp 0.01*maxAmp]); and I get the result http://django.jayparlar.com/matlab.png (which is what it should look like). It matplotlib/ipython, I do the following: In [53]: a = imread("4kSnake.png") In [54]: a = double(imread("4kSnake.png")) In [55]: FT = fftpack.fftshift(fftpack.fft2(a)) In [56]: FT_Amp = abs(FT) In [57]: imshow(FT_Amp, cmap=cm.gray) and I get the result http://django.jayparlar.com/matplotlib.png Can anyone offer any insight as to why? I'm fairly new to matplotlib, but I'm a LONG time Python user, and would much rather continue my work in Python than Matlab. 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. 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. Many thanks, Jay P. 