code: def qnm_freq_decay(f_0, tau, decay):
      
  
      q_0 = pi * f_0 * tau
      alpha = 1. / decay
      alpha_sq = 1. / decay / decay
  
      # Expression obtained analytically under the assumption
      # that 1./alpha_sq, q_0^2 >> 1
      q_sq = (alpha_sq + 4*q_0*q_0 + alpha*numpy.sqrt(alpha_sq + 16*q_0*q_0)) / 4.
      return numpy.sqrt(q_sq) / pi / tau
docs: Return the frequency at which the amplitude of the
      ringdown falls to decay of the peak amplitude.
  
      Parameters
      ----------
      f_0 : float
          The ringdown-frequency, which gives the peak amplitude.
      tau : float
          The damping time of the sinusoid.
      decay: float
          The fraction of the peak amplitude.
  
      Returns
      -------
      f_decay: float
          The frequency at which the amplitude of the frequency-domain
          ringdown falls to decay of the peak amplitude.