sainsc.lazykde.LazyKDE.filter_background

sainsc.lazykde.LazyKDE.filter_background(min_norm, min_cosine=None, min_assignment=None)

Define pixels as background.

If using multiple thresholds (e.g. on norm and cosine similarity) they will be combined and pixels are defined as background if they are lower than any of the thresholds.

Parameters:
Raises:

ValueError – If cell type-specific thresholds do not include all cell types or if using cell type-specific thresholds before cell type assignment.