code: def check_each_direction(n,angs,ifprint=True):
      
      checks = np.array([])
      P = np.array([])
      if(ifprint):
          print("\nChecking modes:\n====")
      for k,i in enumerate(n):
          N_matrix = np.linalg.norm(i)
          X = np.dot(angs,i)
          if(np.abs(np.max(X)-np.min(X))<2.*np.pi):
              if(ifprint):
                  print("Need a longer integration window for mode ", i)
              checks=np.append(checks,i)
              P = np.append(P,(2.*np.pi-np.abs(np.max(X)-np.min(X))))
          elif(np.abs(np.max(X)-np.min(X))/len(X)>np.pi):
              if(ifprint):
                  print("Need a finer sampling for mode ", i)
              checks=np.append(checks,i)
              P = np.append(P,(2.*np.pi-np.abs(np.max(X)-np.min(X))))
      if(ifprint):
          print("====\n")
      return checks,P
docs: returns a list of the index of elements of n which do not have adequate
      toy angle coverage. The criterion is that we must have at least one sample
      in each Nyquist box when we project the toy angles along the vector n