Map each region label to its periodic representative (optional connectivity groups).
Parameters
Name
Type
Description
Default
regions
a 3D array of integers, where each integer is a region index, obtained from regions_from_dgrid function
required
maxima
the 3D indices of the maxima, obtained from regions_from_dgrid function
required
maxima_radii
the list of radii of the maxima (in Angstrom)
required
return_conn
if True, returns the connectivity groups of the regions, defaults to False (optional)
False
Returns
Name
Type
Description
a dictionary with the keys being the starting region indices and the values being the periodic group of the regions. then to apply this periodic map to regions, use: np.vectorize(periodic_map.get)(regions)