hats.catalog.dataset.table_properties
=====================================

.. py:module:: hats.catalog.dataset.table_properties


Attributes
----------

.. autoapisummary::

   hats.catalog.dataset.table_properties.CATALOG_TYPE_REQUIRED_FIELDS


Classes
-------

.. autoapisummary::

   hats.catalog.dataset.table_properties.TableProperties


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

.. py:data:: CATALOG_TYPE_REQUIRED_FIELDS

.. py:class:: TableProperties(/, **data: Any)

   Bases: :py:obj:`pydantic.BaseModel`


   
   Container class for catalog metadata
















   ..
       !! processed by numpydoc !!

   .. py:attribute:: catalog_name
      :type:  str
      :value: None



   .. py:attribute:: catalog_type
      :type:  hats.catalog.catalog_type.CatalogType
      :value: None



   .. py:attribute:: total_rows
      :type:  Optional[int]
      :value: None



   .. py:attribute:: ra_column
      :type:  Optional[str]
      :value: None



   .. py:attribute:: dec_column
      :type:  Optional[str]
      :value: None



   .. py:attribute:: default_columns
      :type:  Optional[list[str]]
      :value: None


      
      Which columns should be read from parquet files, when user doesn't otherwise specify.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: healpix_column
      :type:  Optional[str]
      :value: None


      
      Column name that provides a spatial index of healpix values at some fixed, high order.
      A typical value would be ``_healpix_29``, but can vary.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: healpix_order
      :type:  Optional[int]
      :value: None


      
      For the spatial index of healpix values in ``hats_col_healpix``
      what is the fixed, high order. A typicaly value would be 29, but can vary.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: primary_catalog
      :type:  Optional[str]
      :value: None


      
      Reference to object catalog. Relevant for nested, margin, association, and index.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: margin_threshold
      :type:  Optional[float]
      :value: None


      
      Threshold of the pixel boundary, expressed in arcseconds.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: primary_column
      :type:  Optional[str]
      :value: None


      
      Column name in the primary (left) side of join.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: primary_column_association
      :type:  Optional[str]
      :value: None


      
      Column name in the association table that matches the primary (left) side of join.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: join_catalog
      :type:  Optional[str]
      :value: None


      
      Catalog name for the joining (right) side of association.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: join_column
      :type:  Optional[str]
      :value: None


      
      Column name in the joining (right) side of join.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: join_column_association
      :type:  Optional[str]
      :value: None


      
      Column name in the association table that matches the joining (right) side of join.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: assn_max_separation
      :type:  Optional[float]
      :value: None


      
      The maximum separation between two points in an association catalog, expressed in arcseconds.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: contains_leaf_files
      :type:  Optional[bool]
      :value: None


      
      Whether or not the association catalog contains leaf parquet files.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: indexing_column
      :type:  Optional[str]
      :value: None


      
      Column that we provide an index over.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: extra_columns
      :type:  Optional[list[str]]
      :value: None


      
      Any additional payload columns included in index.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: npix_suffix
      :type:  str
      :value: None


      
      Suffix of the Npix partitions.
      In the standard HATS directory structure, this is ``'.parquet'`` because there is a single file
      in each Npix partition and it is named like ``'Npix=313.parquet'``.
      Other valid directory structures include those with the same single file per partition but
      which use a different suffix (e.g., ``'npix_suffix' = '.parq'`` or ``'.snappy.parquet'``),
      and also those in which the Npix partitions are actually directories containing 1+ files
      underneath (and then ``'npix_suffix' = '/'``).
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: skymap_order
      :type:  Optional[int]
      :value: None


      
      Nested Order of the healpix skymap stored in the default skymap.fits.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: skymap_alt_orders
      :type:  Optional[list[int]]
      :value: None


      
      Nested Order (K) of the healpix skymaps stored in altnernative skymap.K.fits.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: hats_max_rows
      :type:  Optional[int]
      :value: None


      
      Maximum number of rows in any partition of the catalog.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: hats_max_bytes
      :type:  Optional[int]
      :value: None


      
      Maximum number of bytes in any partition of the catalog.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: hats_estsize
      :type:  Optional[int]
      :value: None


      
      Estimated size of the catalog on disk, in kilobytes.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: moc_sky_fraction
      :type:  Optional[float]
      :value: None



   .. py:attribute:: model_config

      
      Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
















      ..
          !! processed by numpydoc !!


   .. py:method:: space_delimited_list(str_value: str) -> list[str]
      :classmethod:


      
      Convert a space-delimited list string into a python list of strings.


      :Parameters:

          **str_value: str**
              a space-delimited list string



      :Returns:

          list[str]
              python list of strings











      ..
          !! processed by numpydoc !!


   .. py:method:: space_delimited_int_list(str_value: str | list[int]) -> list[int]
      :classmethod:


      
      Convert a space-delimited list string into a python list of integers.


      :Parameters:

          **str_value** : str | list[int]
              string representation of a list of integers, delimited by
              space, comma, or semicolon, or a list of integers.



      :Returns:

          list[int]
              a python list of integers




      :Raises:

          ValueError
              if any non-digit characters are encountered







      ..
          !! processed by numpydoc !!


   .. py:method:: serialize_as_space_delimited_list(str_list: Iterable) -> str

      
      Convert a python list of strings into a space-delimited string.


      :Parameters:

          **str_list: Iterable**
              a python list of strings



      :Returns:

          str
              a space-delimited string.











      ..
          !! processed by numpydoc !!


   .. py:method:: check_required() -> Self

      
      Check that type-specific fields are appropriate, and required fields are set.
















      ..
          !! processed by numpydoc !!


   .. py:method:: copy_and_update(**kwargs)

      
      Create a validated copy of these table properties, updating the fields provided in kwargs.


      :Parameters:

          **\*\*kwargs**
              values to update



      :Returns:

          TableProperties
              new instance of properties object











      ..
          !! processed by numpydoc !!


   .. py:method:: explicit_dict(by_alias=False, exclude_none=True)

      
      Create a dict, based on fields that have been explicitly set, and are not "extra" keys.


      :Parameters:

          **by_alias** : bool
              (Default value = False)

          **exclude_none** : bool
              (Default value = True)



      :Returns:

          dict
              all keys that are attributes of this class and not "extra".











      ..
          !! processed by numpydoc !!


   .. py:method:: extra_dict(by_alias=False, exclude_none=True)

      
      Create a dict, based on fields that are "extra" keys.


      :Parameters:

          **by_alias** : bool
              (Default value = False)

          **exclude_none** : bool
              (Default value = True)



      :Returns:

          dict
              all keys that are *not* attributes of this class, e.g. "extra".











      ..
          !! processed by numpydoc !!


   .. py:method:: __repr__()


   .. py:method:: __str__()

      
      Friendly string representation based on named fields.
















      ..
          !! processed by numpydoc !!


   .. py:method:: read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) -> Self
      :classmethod:


      
      Read field values from a java-style properties file.


      :Parameters:

          **catalog_dir: str | Path | UPath**
              path to a catalog directory.



      :Returns:

          TableProperties
              object created from the contents of a ``hats.properties`` file in
              the given directory




      :Raises:

          FileNotFoundError
              if there is no properties or hats.properties file in the directory







      ..
          !! processed by numpydoc !!


   .. py:method:: to_properties_file(catalog_dir: str | pathlib.Path | upath.UPath)

      
      Write fields to a java-style properties file.


      :Parameters:

          **catalog_dir: str | Path | UPath**
              directory to write the file














      ..
          !! processed by numpydoc !!


   .. py:method:: new_provenance_dict(path: str | pathlib.Path | upath.UPath | None = None, builder: str | None = None, **kwargs) -> dict
      :staticmethod:


      
      Constructs the provenance properties for a HATS catalog.


      :Parameters:

          **path: str | Path | UPath | None**
              The path to the catalog directory.

          **builder** : str | None
              The name and version of the tool that created the catalog.

          **\*\*kwargs**
              Additional properties to include/override in the dictionary.



      :Returns:

          dict
              A dictionary with properties for the HATS catalog.











      ..
          !! processed by numpydoc !!


