ft=i2f(ad,im) Clem's idea of what a ft should do. Remove bogus (1/N^2) normalization and make power conserving. It is Num Rec and TMS convention to use negative exponent in the ft operation that goes from image to frequency space. This corresponds to Matlab ifft function. If input 3D treats as stack of images over 3rd dimension.
0001 function ft=i2f(ad,im) 0002 % ft=i2f(ad,im) 0003 % 0004 % Clem's idea of what a ft should do. 0005 % Remove bogus (1/N^2) normalization and make power conserving. 0006 % 0007 % It is Num Rec and TMS convention to use negative exponent 0008 % in the ft operation that goes from image to frequency space. 0009 % This corresponds to Matlab ifft function. 0010 % 0011 % If input 3D treats as stack of images over 3rd dimension. 0012 0013 im=squeeze(im); 0014 n=ndims(im); 0015 if(n<2|n>3) 0016 error('Input must be 2D or 3D'); 0017 end 0018 0019 for i=1:size(im,3) 0020 ft(:,:,i)=ad.del_t^2*ad.N_pix^2*fftshift(ifft2(fftshift(im(:,:,i)))); 0021 end 0022 0023 return