lsdb.dask.crossmatch_catalog_data#

Module Contents#

Functions#

perform_crossmatch(left_df, right_df, right_margin_df, ...)

Performs a crossmatch on data from a HEALPix pixel in each catalog

crossmatch_catalog_data(...)

Cross-matches the data from two catalogs

get_crossmatch_algorithm(...)

Gets the function to perform a cross-match algorithm

Attributes#

builtin_crossmatch_algorithms

builtin_crossmatch_algorithms[source]#
perform_crossmatch(left_df, right_df, right_margin_df, left_pix, right_pix, right_margin_pix, left_hc_structure, right_hc_structure, right_margin_hc_structure, algorithm, suffixes, right_columns, **kwargs)[source]#

Performs a crossmatch on data from a HEALPix pixel in each catalog

Filters the left catalog before performing the cross-match to stop duplicate points appearing in the result.

crossmatch_catalog_data(left: lsdb.catalog.catalog.Catalog, right: lsdb.catalog.catalog.Catalog, suffixes: Tuple[str, str], algorithm: Type[lsdb.core.crossmatch.abstract_crossmatch_algorithm.AbstractCrossmatchAlgorithm] | lsdb.core.crossmatch.crossmatch_algorithms.BuiltInCrossmatchAlgorithm = BuiltInCrossmatchAlgorithm.KD_TREE, **kwargs) Tuple[dask.dataframe.core.DataFrame, lsdb.types.DaskDFPixelMap, hipscat.pixel_tree.PixelAlignment][source]#

Cross-matches the data from two catalogs

Parameters:
  • left (lsdb.Catalog) – the left catalog to perform the cross-match on

  • right (lsdb.Catalog) – the right catalog to perform the cross-match on

  • suffixes (Tuple[str,str]) – the suffixes to append to the column names from the left and right catalogs respectively

  • algorithm (BuiltInCrossmatchAlgorithm | Callable) – The algorithm to use to perform the crossmatch. Can be specified using a string for a built-in algorithm, or a custom method. For more details, see crossmatch method in the Catalog class.

  • **kwargs – Additional arguments to pass to the cross-match algorithm

Returns:

A tuple of the dask dataframe with the result of the cross-match, the pixel map from HEALPix pixel to partition index within the dataframe, and the PixelAlignment of the two input catalogs.

get_crossmatch_algorithm(algorithm: Type[lsdb.core.crossmatch.abstract_crossmatch_algorithm.AbstractCrossmatchAlgorithm] | lsdb.core.crossmatch.crossmatch_algorithms.BuiltInCrossmatchAlgorithm) Type[lsdb.core.crossmatch.abstract_crossmatch_algorithm.AbstractCrossmatchAlgorithm][source]#

Gets the function to perform a cross-match algorithm

Parameters:
  • algorithm (for a built-in) – The algorithm to use to perform the cross-match. Can be specified using a string

  • algorithm

  • method. (or a custom)

Returns:

The function to perform the specified crossmatch. Either by looking up the method for a built-in algorithm, or returning the custom function.