docs: def dohext(nf, sigma, s):
      """
      calculates hext parameters for nf, sigma and s
  
      Parameters
      __________
      nf :  number of degrees of freedom (measurements - 6)
      sigma : the sigma of the measurements
      s : [x11,x22,x33,x12,x23,x13] - the six tensor elements
  
      Return
      hpars : dictionary of Hext statistics with keys:
          'F_crit' : critical value for anisotropy
          'F12_crit' : critical value for tau1>tau2, tau2>3
          'F' : value of F
          'F12' : value of F12
          'F23' : value of F23
          'v1_dec': declination of principal eigenvector
          'v1_inc': inclination of principal eigenvector
          'v2_dec': declination of major eigenvector
          'v2_inc': inclination of major eigenvector
          'v3_dec': declination of minor eigenvector
          'v3_inc': inclination of minor eigenvector
          't1': principal eigenvalue
          't2': major eigenvalue
          't3': minor eigenvalue
          'e12': angle of confidence ellipse of principal eigenvector in direction of major eigenvector
          'e23': angle of confidence ellipse of major eigenvector in direction of minor eigenvector
          'e13': angle of confidence ellipse of principal eigenvector in direction of minor eigenvector
  
      If working with data set with no sigmas and the average is desired, use nf,sigma,avs=pmag.sbar(Ss) as input
  
      """
  
  #
      hpars = {}
      hpars['F_crit'] = '0'
      hpars['F12_crit'] = '0'
      hpars["F"] = 0
      hpars["F12"] = 0
      hpars["F23"] = 0
      hpars["v1_dec"] = -1
      hpars["v1_inc"] = -1
      hpars["v2_dec"] = -1
      hpars["v2_inc"] = -1
      hpars["v3_dec"] = -1
      hpars["v3_inc"] = -1
      hpars["t1"] = -1
      hpars["t2"] = -1
      hpars["t3"] = -1
      hpars["e12"] = -1
      hpars["e23"] = -1
      hpars["e13"] = -1
      if nf < 0 or sigma == 0:
          return hpars
      f = np.sqrt(2. * fcalc(2, nf))
      t2sum = 0
      tau, Vdir = doseigs(s)
      for i in range(3):
          t2sum += tau[i]**2
      chibar = old_div((s[0] + s[1] + s[2]), 3.)
      hpars['F_crit'] = '%s' % (fcalc(5, nf))
      hpars['F12_crit'] = '%s' % (fcalc(2, nf))
      hpars["F"] = 0.4 * (t2sum - 3 * chibar**2) / (sigma**2)
      hpars["F12"] = 0.5 * (old_div((tau[0] - tau[1]), sigma))**2
      hpars["F23"] = 0.5 * (old_div((tau[1] - tau[2]), sigma))**2
      hpars["v1_dec"] = Vdir[0][0]
      hpars["v1_inc"] = Vdir[0][1]
      hpars["v2_dec"] = Vdir[1][0]
      hpars["v2_inc"] = Vdir[1][1]
      hpars["v3_dec"] = Vdir[2][0]
      hpars["v3_inc"] = Vdir[2][1]
      hpars["t1"] = tau[0]
      hpars["t2"] = tau[1]
      hpars["t3"] = tau[2]
      hpars["e12"] = np.arctan(
          old_div((f * sigma), (2 * abs(tau[0] - tau[1])))) * 180. / np.pi
      hpars["e23"] = np.arctan(
          old_div((f * sigma), (2 * abs(tau[1] - tau[2])))) * 180. / np.pi
      hpars["e13"] = np.arctan(
          old_div((f * sigma), (2 * abs(tau[0] - tau[2])))) * 180. / np.pi
      return hpars