code: def _compute_term_r(self, C, mag, rrup):
          
          if mag > self.M1:
              rrup_min = 0.55
  
          elif mag > self.M2:
              rrup_min = -2.80 * mag + 14.55
  
          else:
              rrup_min = -0.295 * mag + 2.65
  
          R = np.maximum(rrup, rrup_min)
  
          return np.log10(R)
docs: Compute distance term
          d = log10(max(R,rmin));