CLiMB.utils package

Submodules

CLiMB.utils.util module

CLiMB.utils.util.compare_blob(blob_df, blobs_dict)[source]

Compares a given blob (Pandas DataFrame) with all blobs returned from split_points_by_labels.

Parameters: - blob_df: Pandas DataFrame with columns [‘x’, ‘y’] representing the x, y coordinates of a blob. - blobs_dict: dictionary of labeled blobs returned by split_points_by_labels.

Returns: Returns: - A dictionary where keys are labels and values are booleans indicating if exact matches for energy and lz values were found.

CLiMB.utils.util.hungarian_match(known_centroids, centroids, known_labels, filtered_labels)[source]
CLiMB.utils.util.plot_blobs(blobs_dict, blob_df, filename, axis_names, hiding_cluster, save_path='.')[source]

Plots data from different blobs with different colors and a legend.

Parameters: - blobs_dict: dictionary of labeled blobs returned by split_points_by_labels. - blob_df: Pandas DataFrame with 2 columns representing the x, y coordinates of a blob.

CLiMB.utils.util.split_points_by_labels(x, y, labels)[source]

Splits points based on their labels.

Parameters: - x: list or numpy array of x coordinates - y: list or numpy array of y coordinates - labels: list or numpy array of corresponding labels

Returns: - A dictionary where keys are unique labels and values are numpy arrays of shape (N, 2) with x and y coordinates.

Module contents