fftk  Script command
Returns the spatial wavevector kx associated with the Fourier transform of a function of x.
$$ k=\text{fftk}(x)=\frac{2\pi}{dx.M}[0,...,(M1)] $$
where M=length(x).
fftk and all related functions have an option (option 1 below) that controls the format used to store the frequency domain data. When working with spectral data it is not possible to switch between formats; there are no functions to convert between formats. This implies that if you use option1=n to produce a spectrum with fft, then you must also use option1=n if you want to pass that same spectral data to invfft. Similarly, if you use option1=n for fft, then you also need to use option1=n with fftw to get the proper frequency vector corresponding to your spectrum. invfft and fftk work in the same way.
Syntax 
Description 

out = fftk(x); 
Returns the spatial wavevector kx associated with a fourier transform of a function of x.. 
fftk(x,option1,option2); 
option1
option2

Example
If Ex is a 2D matrix of spatial field values where Ex contains the field values along the axis vectors x and y, then the following code will image the field and the fourier transform of Ex.
image(x,y,Ex); Ix = abs( fft(Ex) )^2; kx = fftk(x); ky = fftk(y); image(kx,ky,Ix);
See Also
List of commands , fft , fftw , invfft