hats.catalog.dataset.table_properties#

Attributes#

Classes#

TableProperties

Container class for catalog metadata

Module Contents#

CATALOG_TYPE_REQUIRED_FIELDS[source]#
class TableProperties(/, **data: Any)[source]#

Bases: hats.catalog.dataset.hats_properties.HatsProperties

Container class for catalog metadata

catalog_name: str[source]#
catalog_type: hats.catalog.catalog_type.CatalogType[source]#
total_rows: int | None[source]#
ra_column: str | None[source]#
dec_column: str | None[source]#
default_columns: Annotated[list[str] | None, Field(default=None, alias='hats_cols_default'), PlainSerializer(HatsProperties.serialize_list_as_space_delimited_list), BeforeValidator(HatsProperties.space_delimited_list)][source]#

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

healpix_column: str | None[source]#

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.

healpix_order: int | None[source]#

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.

primary_catalog: str | None[source]#

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

margin_threshold: float | None[source]#

Threshold of the pixel boundary, expressed in arcseconds.

primary_column: str | None[source]#

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

primary_column_association: str | None[source]#

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

join_catalog: str | None[source]#

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

join_column: str | None[source]#

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

join_column_association: str | None[source]#

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

assn_max_separation: float | None[source]#

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

contains_leaf_files: bool | None[source]#

Whether or not the association catalog contains leaf parquet files.

indexing_column: str | None[source]#

Column that we provide an index over.

extra_columns: Annotated[list[str] | None, Field(default=None, alias='hats_index_extra_column'), PlainSerializer(HatsProperties.serialize_list_as_space_delimited_list), BeforeValidator(HatsProperties.space_delimited_list)][source]#

Any additional payload columns included in index.

npix_suffix: str[source]#

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' = '/').

skymap_order: int | None[source]#

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

skymap_alt_orders: Annotated[list[int] | None, Field(default=None, alias='hats_skymap_alt_orders'), PlainSerializer(HatsProperties.serialize_list_as_space_delimited_list), BeforeValidator(HatsProperties.space_delimited_int_list)][source]#

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

hats_max_rows: int | None[source]#

Maximum number of rows in any partition of the catalog.

hats_max_bytes: int | None[source]#

Maximum number of bytes in any partition of the catalog.

hats_estsize: int | None[source]#

Estimated size of the catalog on disk, in kilobytes.

moc_sky_fraction: float | None[source]#
check_required() → Self[source]#

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

copy_and_update(**kwargs)[source]#

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

classmethod read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) → Self[source]#

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

to_properties_file(catalog_dir: str | pathlib.Path | upath.UPath)[source]#

Write fields to a java-style properties file.

Parameters:
catalog_dir: str | Path | UPath

directory to write the file