def freq2Index(freq, sampleRate, nFFT):
    """
    Return the FTT index for a given frequency.

    :param freq: Frequency, of which the bins should be returned
    :type  freq: int
    :param sampleRate: Numbers of data samples per second
    :type  sampleRate: int
    :param nFFT: Length of fourier transform
    :type  nFFT: int
    :return: FFT index of the given frequency
    :rtype: int
    """
    return int(round(freq / (sampleRate / (nFFT*2)), 3))