code: def get_abs(msrc, mrec, srcazm, srcdip, recazm, recdip, verb):
      r
      ab_calc = np.array([[11, 12, 13], [21, 22, 23], [31, 32, 33]])
      if msrc:
          ab_calc += 3
      if mrec:
          ab_calc += 30
          if msrc:
              ab_calc -= 33
          else:
              ab_calc = ab_calc % 10*10 + ab_calc // 10
      bab = np.asarray(ab_calc*0+1, dtype=bool)
      check = np.atleast_1d(srcazm)[0]
      if np.allclose(srcazm % (np.pi/2), 0):
          if np.isclose(check // (np.pi/2) % 2, 0):
              bab[:, 1] *= False
          else:
              bab[:, 0] *= False
      check = np.atleast_1d(srcdip)[0]
      if np.allclose(srcdip % (np.pi/2), 0):
          if np.isclose(check // (np.pi/2) % 2, 0):
              bab[:, 2] *= False
          else:
              bab[:, :2] *= False
      check = np.atleast_1d(recazm)[0]
      if np.allclose(recazm % (np.pi/2), 0):
          if np.isclose(check // (np.pi/2) % 2, 0):
              bab[1, :] *= False
          else:
              bab[0, :] *= False
      check = np.atleast_1d(recdip)[0]
      if np.allclose(recdip % (np.pi/2), 0):
          if np.isclose(check // (np.pi/2) % 2, 0):
              bab[2, :] *= False
          else:
              bab[:2, :] *= False
      ab_calc = ab_calc[bab].ravel()
      if verb > 2:
          print("   Required ab's   : ", _strvar(ab_calc))
      return ab_calc