hats.catalog.catalog_collection
===============================

.. py:module:: hats.catalog.catalog_collection


Classes
-------

.. autoapisummary::

   hats.catalog.catalog_collection.CatalogCollection


Module Contents
---------------

.. py:class:: CatalogCollection(collection_path: upath.UPath, collection_properties: hats.catalog.dataset.collection_properties.CollectionProperties, main_catalog: hats.catalog.catalog.Catalog)

   
   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.















   ..
       !! processed by numpydoc !!

   .. py:attribute:: collection_path


   .. py:attribute:: collection_properties


   .. py:attribute:: main_catalog


   .. py:property:: main_catalog_dir
      :type: upath.UPath


      
      Path to the main catalog directory
















      ..
          !! processed by numpydoc !!


   .. py:property:: all_margins
      :type: list[str] | None


      
      The list of margin catalog names in the collection
















      ..
          !! processed by numpydoc !!


   .. py:property:: default_margin
      :type: str | None


      
      The name of the default margin
















      ..
          !! processed by numpydoc !!


   .. py:property:: default_margin_catalog_dir
      :type: upath.UPath | None


      
      Path to the default margin catalog directory
















      ..
          !! processed by numpydoc !!


   .. py:property:: all_indexes
      :type: dict[str, str] | None


      
      The mapping of indexes in the collection
















      ..
          !! processed by numpydoc !!


   .. py:property:: default_index_field
      :type: str | None


      
      The name of the default index field
















      ..
          !! processed by numpydoc !!


   .. py:property:: default_index_catalog_dir
      :type: upath.UPath | None


      
      Path to the default index catalog directory
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_index_dir_for_field(field_name: str | None = None) -> upath.UPath | None

      
      Path to the field's index catalog directory
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_healpix_pixels() -> list[hats.pixel_math.HealpixPixel]

      
      The list of HEALPix pixels of the main catalog
















      ..
          !! processed by numpydoc !!


   .. py:method:: get_margin_thresholds() -> dict[str, float]

      
      Get the margin thresholds for all margin catalogs in the collection.





      :Returns:

          dict[str, float]
              A dictionary mapping margin catalog names to their threshold values.











      ..
          !! processed by numpydoc !!


