code: def _compute_mean(self, C, mag, dists, vs30, rake, imt):
          
          mean = (self._compute_term_1_2(C, mag) +
                  self._compute_term_3(C, dists.rhypo) +
                  self._compute_site_term(C, vs30) +
                  self._compute_faulting_style_term(C, rake))
  
          # convert from cm/s**2 to g for SA and from m/s**2 to g for PGA (PGV
          # is already in cm/s) and also convert from base 10 to base e.
          if imt.name == "PGA":
              mean = np.log((10 ** mean) / g)
          elif imt.name == "SA":
              mean = np.log((10 ** mean) * ((2 * np.pi / imt.period) ** 2) *
                            1e-2 / g)
          else:
              mean = np.log(10 ** mean)
  
          return mean
docs: Compute mean value for PGV, PGA and Displacement responce spectrum,
          as given in equation 2, page 462 with the addition of the faulting
          style term as given in equation 5, page 465. Converts also
          displacement responce spectrum values to SA.