parameters: (nuclear_hkls, sats_hkls)
return_statement: return np.array(qs)
docstring: Find the q vector between the nuclear HKLs and the satellite peaks
  
      Given a list of HKL positions and a list of fractional HKL positions of
      satellite peaks, find the difference between each satellite and its nearest
      integer HKL.
  
      :param nuclear_hkls: the positions of integer HKL peaks.
      :param sats_hkls: the positions of fractional "satellite" HKL peaks.
      :returns: np.ndarray -- array of q vectors.
docstring_summary: Find the q vector between the nuclear HKLs and the satellite peaks
docstring_tokens: Find the q vector between the nuclear HKLs and the satellite peaks
function: def find_q_vectors(nuclear_hkls, sats_hkls):
      """Find the q vector between the nuclear HKLs and the satellite peaks
  
      Given a list of HKL positions and a list of fractional HKL positions of
      satellite peaks, find the difference between each satellite and its nearest
      integer HKL.
  
      :param nuclear_hkls: the positions of integer HKL peaks.
      :param sats_hkls: the positions of fractional "satellite" HKL peaks.
      :returns: np.ndarray -- array of q vectors.
      """
      peak_map = KDTree(nuclear_hkls)
      qs = []
      for sat in sats_hkls:
          distance, index = peak_map.query(sat, k=1)
          if distance > 2:
              # peak too far away from satellite ignore
              continue
          nearest_peak = nuclear_hkls[index]
          qs.append(sat - nearest_peak)
      return np.array(qs)
function_tokens: def find_q_vectors ( nuclear_hkls , sats_hkls ) : peak_map = KDTree ( nuclear_hkls ) qs = [ ] for sat in sats_hkls : distance , index = peak_map . query ( sat , k = 1 ) if distance > 2 : # peak too far away from satellite ignore continue nearest_peak = nuclear_hkls [ index ] qs . append ( sat - nearest_peak ) return np . array ( qs )