to_collection#
- to_collection(catalog, *, base_collection_path: str | Path | UPath, catalog_name: str | None = None, default_columns: list[str] | None = None, overwrite: bool = False, error_if_empty: bool = True, **kwargs)[source]#
Saves the catalog collection to disk in the HATS format.
The output contains the main catalog and its margin cache, if it exists.
- Parameters:
- catalogHealpixDataset
A catalog to export
- base_catalog_pathpath-like
Location where catalog is saved to
- catalog_namestr or None, default None
The name of the catalog to be saved
- default_columnslist[str] or None, default None
A metadata property with the list of the columns in the catalog to be loaded by default. By default, uses the default columns from the original hats catalog if they exist.
- overwritebool, default False
If True existing collection is overwritten
- error_if_emptybool, default True
If True, raises an error if the catalog is empty
- **kwargs
Arguments to pass to the parquet write operations