code: def lm_ffinal(freqs, damping_times, modes):
      
  
      f_max = {}
      for lmn in modes:
          l, m, nmodes = int(lmn[0]), int(lmn[1]), int(lmn[2])
          for n in range(nmodes):
              f_max['%d%d%d' %(l,m,n)] = qnm_freq_decay(freqs['%d%d%d' %(l,m,n)],
                                        damping_times['%d%d%d' %(l,m,n)], 1./1000)
  
      f_final = max(f_max.values())
      if f_final > max_freq:
          f_final = max_freq
  
      return f_final
docs: Return the maximum f_final of the modes given, with f_final the frequency
      at which the amplitude falls to 1/1000 of the peak amplitude