normalize_field#

omnipose.utils.normalize_field(mu, use_torch=False, cutoff=0)[source]#

normalize all nonzero field vectors to magnitude 1

Parameters

mu (ndarray, float) -- Component array of lenth N by L1 by L2 by ... by LN.

Return type

normalized component array of identical size.