mlreco.post_processing.analysis.michel_reconstruction_2d module

mlreco.post_processing.analysis.michel_reconstruction_2d.find_edges(coords)[source]
mlreco.post_processing.analysis.michel_reconstruction_2d.is_at_edge(cluster_coords, point_coords, one_pixel=1, radius=10.0)[source]

Determines whether the point with coordinates point_coords is at the edge of the cluster with coordinates cluster_coords. Removes a disc of radius radius around that point, runs DBSCAN and checks whether there is still only 1 cluster.

Assumes: that DBSCAN run on cluster_coords will only find 1 cluster.

cluster_coords: np.array (N, data_dim) point_coords: np.array (1, data_dim) or (data_dim,)

mlreco.post_processing.analysis.michel_reconstruction_2d.michel_reconstruction_2d(cfg, data_blob, res, logdir, iteration)[source]

Very simple algorithm to reconstruct Michel clusters from UResNet semantic segmentation output.

Parameters
  • data_blob (dict) – Input dictionary returned by iotools

  • res (dict) – Results from the network, dictionary using analysis_keys

  • cfg (dict) – Configuration

  • idx (int) – Iteration number

Notes

Assumes 2D

Requires the following analysis keys: - segmentation output of UResNet Requires the following input keys: - input_data - segment_label - particles_label to get detailed information such as energy. - clusters_label from cluster3d_mcst for true clusters informations

Output
  • Writes 2 CSV files

  • - `michel_reconstruction-*`

  • - `michel_reconstruction2-*`