docs: def _compute_mean(self, C, mag, rjb):
          """
          Compute ground motion mean value.
          """
          # line 1686 in hazgridXnga2.f
          ffc = self._compute_finite_fault_correction(mag)
          d = np.sqrt(rjb ** 2 + (C['c7'] ** 2) * (ffc ** 2))
  
          # lines 1663, 1694-1696 in hazgridXnga2.f
          mean = (
              C['c1'] + C['c2'] * (mag - 6.) +
              C['c3'] * ((mag - 6.) ** 2) -
              C['c4'] * np.log(d) - C['c6'] * d
          )
  
          factor = np.log(rjb / 100.)
          idx = factor > 0
          mean[idx] -= (C['c5'] - C['c4']) * factor[idx]
  
          return mean