hats.pixel_tree#
Submodules#
Classes#
Represents how two pixel trees align with each other, meaning which pixels match |
|
The type of alignment between catalog trees. Like a join, the types describe if nodes should |
Functions#
|
Generate a PixelAlignment object from two pixel trees |
Package Contents#
- class PixelAlignment(aligned_tree: hats.pixel_tree.pixel_tree.PixelTree, pixel_mapping: pandas.DataFrame, alignment_type: hats.pixel_tree.pixel_alignment_types.PixelAlignmentType, moc: mocpy.MOC = None)[source]#
Represents how two pixel trees align with each other, meaning which pixels match or overlap between the catalogs, and a new tree with the smallest pixels from each tree
For more information on the pixel alignment algorithm, view this document: https://docs.google.com/document/d/1gqb8qb3HiEhLGNav55LKKFlNjuusBIsDW7FdTkc5mJU/edit?usp=sharing
- pixel_mapping#
A dataframe where each row contains a pixel from each tree that match, and which pixel in the aligned tree they match with
- pixel_tree#
The aligned tree generated by using the smallest pixels in each tree. For example, a tree with pixels at order 0, pixel 1, and a tree with order 1, pixel 4,5,6, and 7, would result in the smaller order 1 pixels in the aligned tree.
- alignment_type#
The type of alignment describing how to handle nodes which exist in one tree but not the other. Options are:
inner - only use pixels that appear in both catalogs
left - use all pixels that appear in the left catalog and any overlapping from the right
right - use all pixels that appear in the right catalog and any overlapping from the left
outer - use all pixels from both catalogs
- PRIMARY_ORDER_COLUMN_NAME = 'primary_Norder'#
- PRIMARY_PIXEL_COLUMN_NAME = 'primary_Npix'#
- JOIN_ORDER_COLUMN_NAME = 'join_Norder'#
- JOIN_PIXEL_COLUMN_NAME = 'join_Npix'#
- ALIGNED_ORDER_COLUMN_NAME = 'aligned_Norder'#
- ALIGNED_PIXEL_COLUMN_NAME = 'aligned_Npix'#
- pixel_tree#
- pixel_mapping#
- alignment_type#
- moc = None#
- align_trees(left: hats.pixel_tree.pixel_tree.PixelTree, right: hats.pixel_tree.pixel_tree.PixelTree, alignment_type: hats.pixel_tree.pixel_alignment_types.PixelAlignmentType = PixelAlignmentType.INNER) PixelAlignment [source]#
Generate a PixelAlignment object from two pixel trees
A PixelAlignment represents how two pixel trees align with each other, meaning which pixels match or overlap between the catalogs, and includes a new tree with the smallest pixels from each tree
For more information on the pixel alignment algorithm, view this document: https://docs.google.com/document/d/1gqb8qb3HiEhLGNav55LKKFlNjuusBIsDW7FdTkc5mJU/edit?usp=sharing
- Parameters:
left – The left tree to align
right – The right tree to align
alignment_type –
The type of alignment describing how to handle nodes which exist in one tree but not the other. Options are:
inner - only use pixels that appear in both catalogs
left - use all pixels that appear in the left catalog and any overlapping from the right
right - use all pixels that appear in the right catalog and any overlapping from the left
outer - use all pixels from both catalogs
- Returns:
The PixelAlignment object with the alignment from the two trees