code: def vector_mean(data):
      
      Xbar = np.zeros((3))
      X = dir2cart(data).transpose()
      for i in range(3):
          Xbar[i] = X[i].sum()
      R = np.sqrt(Xbar[0]**2+Xbar[1]**2+Xbar[2]**2)
      Xbar = Xbar/R
      dir = cart2dir(Xbar)
      return dir, R
docs: calculates the vector mean of a given set of vectors
      Parameters
      __________
      data :  nested array of [dec,inc,intensity]
  
      Returns
      _______
      dir : array of [dec, inc, 1]
      R : resultant vector length