MarginCatalog#
- class MarginCatalog(operation: Operation, hc_structure: MarginCatalog, loading_config: HatsLoadingConfig | None = None)[source]#
LSDB Catalog that contains the margin of another HATS catalog.
- Attributes:
all_columnsReturns the names of all columns in the original Dataset.
columnsReturns the names of columns available in the Dataset
dtypesReturns the pandas datatypes of the columns in the Dataset
exploded_columnsreturns the list of column names and nested subcolumn names (in exploded, dot notation)
metaReturns the dask-style meta for the Dataset
nameThe name of the catalog
nested_columnsThe names of the columns of the catalog that are nested.
npartitionsReturns the number of partitions of the catalog
original_schemaReturns the schema of the original Dataset
partitionsReturns the partitions of the catalog
Methods
aggregate_column_statistics([...])Read footer statistics in parquet metadata, and report on global min/max values.
box_search(ra, dec[, fine])Performs filtering according to right ascension and declination ranges.
compute([progress_bar, tqdm_kwargs])Compute dask distributed dataframe to pandas dataframe.
cone_search(ra, dec, radius_arcsec[, fine])Perform a cone search to filter the catalog.
drop(columns[, errors])Drop specified columns from the catalog.
est_size()Estimate the size of the catalog in KiB
estimate_size()Estimate size of catalog.
get_healpix_pixels()Get all HEALPix pixels that are contained in the catalog
get_ordered_healpix_pixels()Get all HEALPix pixels that are contained in the catalog, ordered by breadth-first nested ordering.
get_partition(order, pixel)Get the partition for a given HEALPix pixel
head([n])Returns a few rows of initial data for previewing purposes.
map_partitions(func, *args[, meta, ...])Applies a function to each partition in the catalog.
map_rows(func[, columns, row_container, ...])Takes a function and applies it to each top-level row of the Catalog.
moc_search(moc[, fine])Finds all catalog points that are contained within a moc.
nest_lists([base_columns, list_columns, name])Creates a new catalog with a set of list columns packed into a nested column.
order_search([min_order, max_order])Filter catalog by order of HEALPix.
per_partition_statistics(*[, ...])Read footer statistics in parquet metadata, and report on min/max values for for each data partition.
per_pixel_statistics(*[, ...])Read footer statistics in parquet metadata, and report on min/max values for for each data partition.
pixel_search(pixels[, fine])Finds all catalog pixels that overlap with the requested pixel set.
plot_coverage(**kwargs)Create a visual map of the coverage of the catalog.
plot_pixels([projection])Create a visual map of the pixel density of the catalog.
plot_points(*[, ra_column, dec_column, ...])Plots the points in the catalog as a scatter plot
polygon_search(vertices[, fine])Perform a polygonal search to filter the catalog.
prune_empty_partitions()Prunes the catalog of its empty partitions
query(expr)Filters catalog using a complex query expression.
random_sample([n, seed])Returns a few randomly sampled rows, like self.sample(), except that it randomly samples all partitions in order to fulfill the rows.
rename(columns)Renames catalog columns (not indices) using a dictionary or function mapping.
rename_catalog(name)Renames the catalog.
sample(partition_id[, n, seed])Returns a few randomly sampled rows from a given partition.
search(search)Find rows by reusable search algorithm.
tail([n])Returns a few rows of data from the end of the catalog for previewing purposes.
to_dask_dataframe([divisions])Converts to a Dask DataFrame
to_delayed()Get a list of Dask Delayed objects for each partition in the dataset
to_lance(base_catalog_path[, table_name, ...])Save the catalog to a Lance dataset.
write_catalog(base_catalog_path, *[, ...])Save the catalog to disk in HATS format.
to_hats
- __init__(operation: Operation, hc_structure: MarginCatalog, loading_config: HatsLoadingConfig | None = None)[source]#
Initialise a Catalog object.
Not to be used to load a catalog directly, use one of the lsdb.from_… or lsdb.open_… methods
- Parameters:
- operation: Operation
The LSDB operation that created the dataset
- hc_structure: HCHealpixDataset
Object with hats metadata of the catalog
- loading_config: HatsLoadingConfig or None, default None
The configuration used to read the catalog from disk
Methods
__init__(operation, hc_structure[, ...])Initialise a Catalog object.
aggregate_column_statistics([...])Read footer statistics in parquet metadata, and report on global min/max values.
box_search(ra, dec[, fine])Performs filtering according to right ascension and declination ranges.
compute([progress_bar, tqdm_kwargs])Compute dask distributed dataframe to pandas dataframe.
cone_search(ra, dec, radius_arcsec[, fine])Perform a cone search to filter the catalog.
drop(columns[, errors])Drop specified columns from the catalog.
est_size()Estimate the size of the catalog in KiB
estimate_size()Estimate size of catalog.
get_healpix_pixels()Get all HEALPix pixels that are contained in the catalog
get_ordered_healpix_pixels()Get all HEALPix pixels that are contained in the catalog, ordered by breadth-first nested ordering.
get_partition(order, pixel)Get the partition for a given HEALPix pixel
head([n])Returns a few rows of initial data for previewing purposes.
map_partitions(func, *args[, meta, ...])Applies a function to each partition in the catalog.
map_rows(func[, columns, row_container, ...])Takes a function and applies it to each top-level row of the Catalog.
moc_search(moc[, fine])Finds all catalog points that are contained within a moc.
nest_lists([base_columns, list_columns, name])Creates a new catalog with a set of list columns packed into a nested column.
order_search([min_order, max_order])Filter catalog by order of HEALPix.
per_partition_statistics(*[, ...])Read footer statistics in parquet metadata, and report on min/max values for for each data partition.
per_pixel_statistics(*[, ...])Read footer statistics in parquet metadata, and report on min/max values for for each data partition.
pixel_search(pixels[, fine])Finds all catalog pixels that overlap with the requested pixel set.
plot_coverage(**kwargs)Create a visual map of the coverage of the catalog.
plot_pixels([projection])Create a visual map of the pixel density of the catalog.
plot_points(*[, ra_column, dec_column, ...])Plots the points in the catalog as a scatter plot
polygon_search(vertices[, fine])Perform a polygonal search to filter the catalog.
prune_empty_partitions()Prunes the catalog of its empty partitions
query(expr)Filters catalog using a complex query expression.
random_sample([n, seed])Returns a few randomly sampled rows, like self.sample(), except that it randomly samples all partitions in order to fulfill the rows.
rename(columns)Renames catalog columns (not indices) using a dictionary or function mapping.
rename_catalog(name)Renames the catalog.
sample(partition_id[, n, seed])Returns a few randomly sampled rows from a given partition.
search(search)Find rows by reusable search algorithm.
tail([n])Returns a few rows of data from the end of the catalog for previewing purposes.
to_dask_dataframe([divisions])Converts to a Dask DataFrame
to_delayed()Get a list of Dask Delayed objects for each partition in the dataset
to_hats(base_catalog_path, *[, ...])Save the catalog to disk in the HATS format.
to_lance(base_catalog_path[, table_name, ...])Save the catalog to a Lance dataset.
write_catalog(base_catalog_path, *[, ...])Save the catalog to disk in HATS format.
Attributes
all_columnsReturns the names of all columns in the original Dataset.
columnsReturns the names of columns available in the Dataset
dtypesReturns the pandas datatypes of the columns in the Dataset
exploded_columnsreturns the list of column names and nested subcolumn names (in exploded, dot notation)
metaReturns the dask-style meta for the Dataset
nameThe name of the catalog
nested_columnsThe names of the columns of the catalog that are nested.
npartitionsReturns the number of partitions of the catalog
original_schemaReturns the schema of the original Dataset
partitionsReturns the partitions of the catalog
hc_structure