Tract and Patch Search
To see the method and configuration in action, check out the /notebooks/tract_patch_search notebook.
- tract_patch_search(self, skymap_reader, tract: int, patch: int | None = None, fine: bool = True)[source]
Perform a tract/patch search to filter the catalog.
This method filters points within the given tract and patch, and filters partitions in the catalog that overlap with the specified tract and patch.
A skymap_reader is required to perform this search. A skymap_reader is an instance of skymap_convert.ConvertedSkymapReader that provides access to the vertices of tracts and patches in the sky.
- Parameters:
self (Catalog) – The catalog to be filtered.
skymap_reader (lsdb_rubin.skymap_convert.ConvertedSkymapReader) – The skymap reader specifying tracts and patches within the sky.
tract (int) – The tract ID within the given skymap.
patch (int) – The patch ID within the given skymap. If None, the entire tract is used.
fine (bool) – True if points are to be filtered, False if only partitions should be filtered. Defaults to True.
use_inner (bool) – If True, use the inner polygon for the search. If False, use the outer polygon. Defaults to False.
- Returns:
A new Catalog containing the points filtered to those within the tract and patch, and the partitions that overlap the tract and patch.
- class TractPatchSearch(skymap_reader, tract: int, patch: int | None = None, fine: bool = True)[source]
Perform a spatial search to filter the catalog based on tract and patch.
This class filters points within the given tract and patch, and filters partitions in the catalog that overlap with the specified tract and patch.
A skymap_reader is required to perform this search. A skymap_reader is an instance of skymap_convert.ConvertedSkymapReader that provides access to the vertices of tracts and patches in the sky.
- skymap_reader
The skymap reader specifying vertices of tracts and patches.
- Type:
skymap_convert.ConvertedSkymapReader
- tract
The tract ID within the skymap.
- Type:
int
- patch
The patch ID within the skymap. If None, the entire tract is used.
- Type:
int | None
- fine
If True, filters points within the tract/patch. If False, only filters partitions.
- Type:
bool
- filter_hc_catalog(self, hc_structure: HCCatalogTypeVar)
Filters the catalog pixels according to given tract/patch
- search_points(self, frame: npd.NestedFrame, metadata) npd.NestedFrame
Determine the search results within a data frame.
- Parameters:
frame (npd.NestedFrame) – The data frame to search.
metadata (hats.catalog.TableProperties) – Metadata for the data frame.
- Returns:
The filtered data frame.
- Return type:
npd.NestedFrame