kernel_setup#

omnipose.utils.kernel_setup(dim)[source]#

Get relevant kernel information for the hypercube of interest. Calls get_steps(), steps_to_indices().

Parameters

dim (int) -- dimension (usually 2 or 3, but can be any positive integer)

Returns

  • steps (ndarray, int) -- list of steps to each kernal point see get_steps()

  • idx (int) -- index of the central point within the step list this is always (3**dim)//2

  • inds (ndarray, int) -- list of kernel points sorted by type see steps_to_indices()

  • fact (float) -- list of face/edge/vertex/... distances see steps_to_indices()

  • sign (1D array, int) -- signature distinguishing each kind of m-face via the number of steps see steps_to_indices()