Creating a grid in Fourier-space

  • Thread starter Thread starter Mizuti
  • Start date Start date
  • Tags Tags
    Grid
Click For Summary
SUMMARY

The discussion focuses on creating a grid in Fourier space using Python's numpy.fft library. The user aims to overlay a second image, generated through a Fast Fourier Transform (FFT) on an 80x80 grid, onto a primary 4x4 arcsec image. The user correctly identifies that the wavenumber (k) is defined as k = 2π/x, with the largest scale corresponding to the smallest k-value. The user seeks confirmation on their understanding of the relationship between spatial dimensions and Fourier space representation.

PREREQUISITES
  • Understanding of Fast Fourier Transform (FFT) principles
  • Familiarity with Python programming, specifically the numpy library
  • Knowledge of spatial dimensions and wavenumber relationships
  • Basic concepts of image processing and grid representation
NEXT STEPS
  • Study the numpy.fft documentation for advanced FFT techniques
  • Explore the mathematical foundations of Fourier transforms in image processing
  • Learn about spatial frequency representation and its applications
  • Investigate methods for overlaying images in Python using libraries like Matplotlib
USEFUL FOR

This discussion is beneficial for mathematicians, data scientists, and software developers involved in image processing and Fourier analysis, particularly those using Python and numpy for computational tasks.

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
 
Physics 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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
19K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K