code: def doeigs_s(tau, Vdirs):
      
      t = np.zeros((3, 3,), 'f')  # initialize the tau diagonal matrix
      V = []
      for j in range(3):
          t[j][j] = tau[j]  # diagonalize tau
      for k in range(3):
          V.append(dir2cart([Vdirs[k][0], Vdirs[k][1], 1.0]))
      V = np.transpose(V)
      tmp = np.dot(V, t)
      chi = np.dot(tmp, np.transpose(V))
      return a2s(chi)
docs: get elements of s from eigenvaulues - note that this is very unstable
       Input:
           tau,V:
             tau is an list of eigenvalues in decreasing order:
                [t1,t2,t3]
             V is an list of the eigenvector directions
                [[V1_dec,V1_inc],[V2_dec,V2_inc],[V3_dec,V3_inc]]
      Output:
          The six tensor elements as a list:
            s=[x11,x22,x33,x12,x23,x13]