code: def max_frequency (sig,FS):
      
      
      f, fs = plotfft(sig, FS, doplot=False)    
      t = cumsum(fs)
      
      ind_mag = find (t>t[-1]*0.95)[0]
      f_max=f[ind_mag]
      return f_max
docs: Compute max frequency along the specified axes.
  
      Parameters
      ----------
      sig: ndarray
          input from which max frequency is computed.
      FS: int
          sampling frequency    
      Returns
      -------
      f_max: int
         0.95 of max_frequency using cumsum.