Home > matutils > interf > f2i.m

f2i

PURPOSE ^

im=f2i(ad,ft)

SYNOPSIS ^

function im=f2i(ad,ft)

DESCRIPTION ^

 im=f2i(ad,ft)

 Clem's idea of what a ft should do.
 Include power conserving normalization.
 Make output purely real (assuming input array is invariant
 under 180 deg rotation).

 It is Num Rec and TMS convention to use positive exponent
 in the ft operation that goes from frequency to image space.
 This corresponds to Matlab fft function.

 If input 3D treats as stack of images over 3rd dimension.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function im=f2i(ad,ft)
0002 % im=f2i(ad,ft)
0003 %
0004 % Clem's idea of what a ft should do.
0005 % Include power conserving normalization.
0006 % Make output purely real (assuming input array is invariant
0007 % under 180 deg rotation).
0008 %
0009 % It is Num Rec and TMS convention to use positive exponent
0010 % in the ft operation that goes from frequency to image space.
0011 % This corresponds to Matlab fft function.
0012 %
0013 % If input 3D treats as stack of images over 3rd dimension.
0014 
0015 ft=squeeze(ft);
0016 n=ndims(ft);
0017 if(n<2|n>3)
0018   error('Input must be 2D or 3D');
0019 end
0020 
0021 % Do the transform and normalize
0022 for i=1:size(ft,3)
0023   im=ad.del_u^2*fftshift(fft2(fftshift(ft)));
0024 end
0025 
0026 % Check result purely real and disguard any imag component
0027 if(sum(rvec(abs(imag(im))))./sum(rvec(abs(real(im))))>0.01)
0028   warning('Significant imag components thrown away');
0029 end  
0030 im=real(im);
0031 return

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005