code: def _compute_a21_factor(self, C, imt, z1pt0, vs30):
          
          e2 = self._compute_e2_factor(imt, vs30)
          a21 = e2.copy()
  
          vs30_star, v1 = self._compute_vs30_star_factor(imt, vs30)
          median_z1pt0 = self._compute_median_z1pt0(vs30)
  
          numerator = ((C['a10'] + C['b'] * self.CONSTS['n']) *
                       np.log(vs30_star / np.min([v1, 1000])))
          denominator = np.log((z1pt0 + self.CONSTS['c2']) /
                               (median_z1pt0 + self.CONSTS['c2']))
  
          idx = numerator + e2 * denominator < 0
          a21[idx] = - numerator[idx] / denominator[idx]
  
          idx = vs30 >= 1000
          a21[idx] = 0.0
  
          return a21
docs: Compute and return a21 factor, equation 18, page 80.