Calculates the two-point correlation function using fourier transforms.
im (ndarray) – The image of the void space on which the 2-point correlation is desired.
result – A tuple containing the x and y data for plotting the two-point correlation function, using the *args feature of matplotlib’s plot function. The x array is the distances between points and the y array is corresponding probabilities that points of a given distance both lie in the void space.
- Return type
The fourier transform approach utilizes the fact that the autocorrelation function is the inverse FT of the power spectrum density. For background read the Scipy fftpack docs and for a good explanation see this thesis
Click here to view online example.