Creating a grid in Fourier-space

  • Thread starter Thread starter Mizuti
  • Start date Start date
  • Tags Tags
    Grid
Click For Summary
The discussion focuses on creating a grid in Fourier space for an image generated through FFT in Python using numpy. The user aims to ensure that the second image, derived from an 80x80 grid in Fourier space, matches the dimensions of a first image measuring 4x4 arcsec. Key points include the relationship between spatial scales and wavenumbers, with the largest scale corresponding to the smallest k-value and vice versa. The user seeks confirmation on their calculations for k-values based on the defined dimensions and grid size. Clarification on the definition of FFT and its implications on sample spacing is also requested.
Mizuti
Messages
1
Reaction score
0
Hello,

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
 
Mathematics news on Phys.org
Exact definition of FFT in the standard way can be found here
http://www.mathworks.com/help/techdoc/ref/fft.html

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.
 
Good morning I have been refreshing my memory about Leibniz differentiation of integrals and found some useful videos from digital-university.org on YouTube. Although the audio quality is poor and the speaker proceeds a bit slowly, the explanations and processes are clear. However, it seems that one video in the Leibniz rule series is missing. While the videos are still present on YouTube, the referring website no longer exists but is preserved on the internet archive...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
869
  • · Replies 11 ·
Replies
11
Views
3K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
48
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K