Find the indices of a set of angles into a set of pixels

    Parameters:
    -----------
    pix    : set of search pixels
    pixels : set of reference pixels
  
    Returns:
    --------
    index : index into the reference pixels

def index_lonlat_in_pixels(lon,lat,pixels,nside,sort=False,outside=-1):
    """
    Find the indices of a set of angles into a set of pixels

    Parameters:
    -----------
    pix    : set of search pixels
    pixels : set of reference pixels
  
    Returns:
    --------
    index : index into the reference pixels
    """

    pix = ang2pix(nside,lon,lat)
    return index_pix_in_pixels(pix,pixels,sort,outside)