1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Creating a grid in Fourier-space

  1. May 2, 2012 #1

    I'm new here and not sure where to put this question, which is more of a mathematical question, but also involves some programming in python (mainly the use of numpy.fft).

    I have a code which creates a square image with dimensions 4x4 arcsec running from -2 arcsec to +2 arcsec and is created on an 80x80 grid. To this I want to add another image. This second image is created through a FFT of an 80x80 grid and thus starts out in Fourier space. After the FFT, I want the image to have exactly the same dimensions in real space as the first image.

    Because Fourier space represents the scales and the wavenumber is defined as k = 2pi/x (although in this case the numpy.fft uses the definition where I think k = 1/x), I thought the largest scale would have to have the smallest k-value and the smallest scale the largest k-value.

    So if x_max = 2 (the dimensions in the x-direction of the first image) and dim_x = 80 (the number of columns in the grid):

    k_x,max = 1/(2*x_max/dim_x)

    k_x,min = 1/(2*x_max)

    and let the grid in Fourier-space run from k_x,min to k_x,max (same for the y-direction)

    I hope I explained this clearly enough, but I haven't been able to find any confirmation or explanation for this in the literature about FFT's and would really like to know if this correct.

    Thanks in advance
  2. jcsd
  3. May 2, 2012 #2
    Exact definition of FFT in the standard way can be found here

    By definition the sample spacing of k is 2*pi/N, where N is the number of samples in the dimension along which fft is performed. It does not care what unit of length is used in the spatial domain.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook