hats.loaders.read_hats#

Attributes#

Functions#

read_hats(→ hats.catalog.Dataset)

Reads a HATS Catalog from a HATS directory

_is_healpix_dataset(dataset_type)

_read_moc_from_point_map(→ mocpy.MOC | None)

Reads a MOC object from the point_map.fits file if it exists in the catalog directory

_read_schema_from_metadata(→ pyarrow.Schema | None)

Reads the schema information stored in the _common_metadata or _metadata files.

Module Contents#

DATASET_TYPE_TO_CLASS[source]#
read_hats(catalog_path: str | pathlib.Path | upath.UPath) hats.catalog.Dataset[source]#

Reads a HATS Catalog from a HATS directory

Parameters:

catalog_path (str) – path to the root directory of the catalog

Returns:

The initialized catalog object

Examples

To read a catalog from a public S3 bucket, call it as follows:

from upath import UPath
catalog = hats.read_hats(UPath(..., anon=True))
_is_healpix_dataset(dataset_type)[source]#
_read_moc_from_point_map(catalog_base_dir: str | pathlib.Path | upath.UPath) mocpy.MOC | None[source]#

Reads a MOC object from the point_map.fits file if it exists in the catalog directory

_read_schema_from_metadata(catalog_base_dir: str | pathlib.Path | upath.UPath) pyarrow.Schema | None[source]#

Reads the schema information stored in the _common_metadata or _metadata files.