def _compute_sample_acf(field):
    """Compute sample ACF from FFT."""
    # TODO: let user choose the FFT method
    field_fft = np.fft.rfft2((field - np.mean(field)) / np.std(field))
    fft_abs = np.abs(field_fft * np.conj(field_fft))

    return np.fft.irfft2(fft_abs, s=field.shape) / (field.shape[0] * field.shape[1])
Compute sample ACF from FFT.
pysteps/nowcasts/linda.py