code: def eigs_s(infile="", dir_path='.'):
      
      file = os.path.join(dir_path, infile)
      eigs_data = np.loadtxt(file)
      Ss = []
      for ind in range(eigs_data.shape[0]):
          tau, Vdirs = [], []
          for k in range(0, 9, 3):
              tau.append(eigs_data[ind][k])
              Vdirs.append([eigs_data[ind][k+1], eigs_data[ind][k+2]])
          s = list(pmag.doeigs_s(tau, Vdirs))
          Ss.append(s)
      return Ss
docs: Converts eigenparamters format data to s format
  
      Parameters
      ___________________
      Input:
          file : input file name with eigenvalues (tau) and eigenvectors (V) with  format:
              tau_1 V1_dec V1_inc tau_2 V2_dec V2_inc tau_3 V3_dec V3_inc
      Output
           the six tensor elements as a nested array
            [[x11,x22,x33,x12,x23,x13],....]