two_point_correlation_fft

two_point_correlation_fft(im)[source]

Calculates the two-point correlation function using fourier transforms.

Parameters

im (ndarray) – The image of the void space on which the 2-point correlation is desired.

Returns

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

named_tuple

Notes

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

Examples

Click here to view online example.