code: def _compute_e2_factor(self, imt, vs30):
          
          e2 = np.zeros_like(vs30)
  
          if imt.name == "PGV":
              period = 1
          elif imt.name == "PGA":
              period = 0
          else:
              period = imt.period
  
          if period < 0.35:
              return e2
          else:
              idx = vs30 <= 1000
              if period >= 0.35 and period <= 2.0:
                  e2[idx] = (-0.25 * np.log(vs30[idx] / 1000) *
                             np.log(period / 0.35))
              elif period > 2.0:
                  e2[idx] = (-0.25 * np.log(vs30[idx] / 1000) *
                             np.log(2.0 / 0.35))
              return e2
docs: Compute and return e2 factor, equation 19, page 80.