hipscat.catalog.catalog
#
Container class to hold catalog metadata and partition iteration
Module Contents#
Classes#
A HiPSCat Catalog with data stored in a HEALPix Hive partitioned structure |
- class Catalog(catalog_info: CatalogInfoClass, pixels: hipscat.catalog.healpix_dataset.healpix_dataset.PixelInputTypes, catalog_path: str = None, moc: mocpy.MOC | None = None, storage_options: Dict[Any, Any] | None = None)[source]#
Bases:
hipscat.catalog.healpix_dataset.healpix_dataset.HealpixDataset
A HiPSCat Catalog with data stored in a HEALPix Hive partitioned structure
Catalogs of this type are partitioned spatially, contain partition_info metadata specifying the pixels in Catalog, and on disk conform to the parquet partitioning structure Norder=/Dir=/Npix=.parquet
- filter_by_cone(ra: float, dec: float, radius_arcsec: float) Catalog [source]#
Filter the pixels in the catalog to only include the pixels that overlap with a cone
- Parameters:
ra (float) – Right Ascension of the center of the cone in degrees
dec (float) – Declination of the center of the cone in degrees
radius_arcsec (float) – Radius of the cone in arcseconds
- Returns:
A new catalog with only the pixels that overlap with the specified cone
- filter_by_box(ra: Tuple[float, float] | None = None, dec: Tuple[float, float] | None = None) Catalog [source]#
Filter the pixels in the catalog to only include the pixels that overlap with a right ascension or declination range. In case both ranges are provided, filtering is performed using a polygon.
- Parameters:
ra (Tuple[float, float]) – Right ascension range, in degrees
dec (Tuple[float, float]) – Declination range, in degrees
- Returns:
A new catalog with only the pixels that overlap with the specified region
- filter_by_polygon(vertices: List[hipscat.pixel_math.polygon_filter.SphericalCoordinates] | List[hipscat.pixel_math.polygon_filter.CartesianCoordinates]) Catalog [source]#
Filter the pixels in the catalog to only include the pixels that overlap with a polygonal sky region.
- Parameters:
vertices (List[SphericalCoordinates] | List[CartesianCoordinates]) – The vertices of the polygon to filter points with, in lists of (ra,dec) or (x,y,z) points on the unit sphere.
- Returns:
A new catalog with only the pixels that overlap with the specified polygon.
- generate_negative_tree_pixels() List[hipscat.pixel_math.HealpixPixel] [source]#
Get the leaf nodes at each healpix order that have zero catalog data.
For example, if an example catalog only had data points in pixel 0 at order 0, then this method would return order 0’s pixels 1 through 11. Used for getting full coverage on margin caches.
- Returns:
List of HealpixPixels representing the ‘negative tree’ for the catalog.