hipscat.pixel_tree.moc_filter

hipscat.pixel_tree.moc_filter#

Module Contents#

Functions#

filter_by_moc(→ hipscat.pixel_tree.pixel_tree.PixelTree)

Filters a pixel tree to only include the pixels that overlap with the pixels in the moc

perform_filter_by_moc(→ numpy.ndarray)

Performs filtering with lists of pixel intervals

filter_by_moc(tree: hipscat.pixel_tree.pixel_tree.PixelTree, moc: mocpy.MOC) hipscat.pixel_tree.pixel_tree.PixelTree[source]#

Filters a pixel tree to only include the pixels that overlap with the pixels in the moc

Parameters:
  • tree (PixelTree) – The tree to perform the filtering on

  • moc (mocpy.MOC) – The moc to use to filter

Returns:

A new PixelTree object with only the pixels from the input tree that overlap with the moc.

perform_filter_by_moc(tree: numpy.ndarray, moc: numpy.ndarray) numpy.ndarray[source]#

Performs filtering with lists of pixel intervals

Input interval lists must be at the same order.

Parameters:
  • tree (np.ndarray) – Array of pixel intervals to be filtered

  • moc (np.ndarray) – Array of pixel intervals to be used to filter

Returns:

A boolean array of dimension tree.shape[0] which masks which pixels in tree overlap with the pixels in moc