code: def doseigs(s):
      
  #
      A = s2a(s)  # convert s to a (see Tauxe 1998)
      tau, V = tauV(A)  # convert to eigenvalues (t), eigenvectors (V)
      Vdirs = []
      for v in V:  # convert from cartesian to direction
          Vdir = cart2dir(v)
          if Vdir[1] < 0:
              Vdir[1] = -Vdir[1]
              Vdir[0] = (Vdir[0] + 180.) % 360.
          Vdirs.append([Vdir[0], Vdir[1]])
      return tau, Vdirs
docs: convert s format for eigenvalues and eigenvectors
  
      Parameters
      __________
      s=[x11,x22,x33,x12,x23,x13] : the six tensor elements
  
      Return
      __________
          tau : [t1,t2,t3]
             tau is an list of eigenvalues in decreasing order:
          V : [[V1_dec,V1_inc],[V2_dec,V2_inc],[V3_dec,V3_inc]]
              is an list of the eigenvector directions