docs: def calculate_taper_function(obs_threshold_moment, sel_threshold_moment,
                               corner_moment, beta):
      '''
      Calculates the tapering function of the tapered Gutenberg & Richter model:
      as described in Bird & Liu (2007)::
  
       taper_function = (M_0(M_T) / M_0(M_T^{CMT}))^-beta x exp((M_0(m_T^CMT) -
           M_0(m_T)) / M_0(m_c))
  
      :param numpy.ndarray obs_threshold_moment:
          Moment of the threshold magnitude of the observed earthquake catalogue
      :param numpy.ndarray sel_threshold_moment:
          Moment of the target magnitude
      :param float corner_momnet:
          Corner moment of the Tapered Gutenberg-Richter Function
      :param float beta:
          Beta value (b * ln(10.)) of the Tapered Gutenberg-Richter Function
      :returns:
          Relative moment rate
      '''
      argument = (obs_threshold_moment - sel_threshold_moment) /\
          corner_moment
      if argument < -100.0:
          g_function = 0.0
      else:
          g_function = ((sel_threshold_moment / obs_threshold_moment) **
                        -beta) * exp(argument)
      return g_function