hats.catalog.catalog_collection#

Classes#

CatalogCollection

A collection of HATS Catalog with data stored in a HEALPix Hive partitioned structure

Module Contents#

class CatalogCollection(collection_path: upath.UPath, collection_properties: hats.catalog.dataset.collection_properties.CollectionProperties, main_catalog: hats.catalog.Catalog)[source]#

A collection of HATS Catalog with data stored in a HEALPix Hive partitioned structure

Catalogs of this type are described by a collection.properties file which specifies the underlying main catalog, margin catalog and index catalog paths. These catalogs are stored at the root of the collection, each in its separate directory:

catalog_collection/
├── main_catalog/
├── margin_catalog/
├── index_catalog/
├── collection.properties

Margin and index catalogs are optional but there could also be multiple of them. The catalogs used by default are specified in the collection.properties file in the default_margin and default_index keywords.

collection_path[source]#
collection_properties[source]#
main_catalog[source]#
property main_catalog_dir: upath.UPath[source]#

Path to the main catalog directory

property all_margins: list[str] | None[source]#

The list of margin catalog names in the collection

property default_margin: str | None[source]#

The name of the default margin

property default_margin_catalog_dir: upath.UPath | None[source]#

Path to the default margin catalog directory

property all_indexes: dict[str, str] | None[source]#

The mapping of indexes in the collection

property default_index_field: str | None[source]#

The name of the default index field

property default_index_catalog_dir: upath.UPath | None[source]#

Path to the default index catalog directory

get_index_dir_for_field(field_name: str | None = None) upath.UPath | None[source]#

Path to the field’s index catalog directory

get_healpix_pixels() list[hats.pixel_math.HealpixPixel][source]#

The list of HEALPix pixels of the main catalog