code: def _compute_hanging_wall_term(self, C, dists, rup):
          
          if rup.dip == 90.0:
              return np.zeros_like(dists.rx)
          else:
              idx = dists.rx > 0
              Fhw = np.zeros_like(dists.rx)
              Fhw[idx] = 1
  
              # equation 8, page 77
              T1 = np.zeros_like(dists.rx)
              idx1 = (dists.rjb < 30.0) & (idx)
              T1[idx1] = 1.0 - dists.rjb[idx1] / 30.0
  
              # equation 9, page 77
              T2 = np.ones_like(dists.rx)
              idx2 = ((dists.rx <= rup.width * np.cos(np.radians(rup.dip))) &
                      (idx))
              T2[idx2] = (0.5 + dists.rx[idx2] /
                          (2 * rup.width * np.cos(np.radians(rup.dip))))
  
              # equation 10, page 78
              T3 = np.ones_like(dists.rx)
              idx3 = (dists.rx < rup.ztor) & (idx)
              T3[idx3] = dists.rx[idx3] / rup.ztor
  
              # equation 11, page 78
              if rup.mag <= 6.0:
                  T4 = 0.0
              elif rup.mag > 6 and rup.mag < 7:
                  T4 = rup.mag - 6
              else:
                  T4 = 1.0
  
              # equation 5, in AS08_NGA_errata.pdf
              if rup.dip >= 30:
                  T5 = 1.0 - (rup.dip - 30.0) / 60.0
              else:
                  T5 = 1.0
  
              return Fhw * C['a14'] * T1 * T2 * T3 * T4 * T5
docs: Compute and return hanging wall model term, that is the sixth term in
          equation 1, page 74. The calculation of this term is explained in
          paragraph 'Hanging-Wall Model', page 77.