Compute fundamental frequency along the specified axes.

    Parameters
    ----------
    s: ndarray
        input from which fundamental frequency is computed.
    FS: int
        sampling frequency    
    Returns
    -------
    f0: int
       its integer multiple best explain the content of the signal spectrum.

def fundamental_frequency(s,FS):
    # TODO: review fundamental frequency to guarantee that f0 exists 
    # suggestion peak level should be bigger 
    # TODO: explain code
    """Compute fundamental frequency along the specified axes.

    Parameters
    ----------
    s: ndarray
        input from which fundamental frequency is computed.
    FS: int
        sampling frequency    
    Returns
    -------
    f0: int
       its integer multiple best explain the content of the signal spectrum.
    """
    
    s = s - mean(s)
    f, fs = plotfft(s, FS, doplot=False)
    
    #fs = smooth(fs, 50.0)
  
    fs = fs[1:int(len(fs) / 2)]
    f = f[1:int(len(f) / 2)]
    
    cond = find(f > 0.5)[0]
    
    bp = bigPeaks(fs[cond:], 0)
    
    if bp==[]:
        f0=0
    else:
        
        bp = bp + cond
        
        f0 = f[min(bp)]
    
    return f0