sainsc.lazykde.LazyKDE.filter_background ======================================== .. py:method:: 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. :param min_norm: The threshold for defining background based on :py:attr:`sainsc.LazyKDE.total_mRNA_KDE`. Either a float which is used as global threshold or a mapping from cell types to thresholds. Cell-type assignment is needed for cell type-specific thresholds. :type min_norm: float or dict[str, float] :param min_cosine: The threshold for defining background based on :py:attr:`sainsc.LazyKDE.cosine_similarity`. Cell type-specific thresholds can be defined as for `min_norm`. :type min_cosine: float or dict[str, float], optional :param min_assignment: The threshold for defining background based on :py:attr:`sainsc.LazyKDE.assignment_score`. Cell type-specific thresholds can be defined as for `min_norm`. :type min_assignment: float or dict[str, float], optional :raises ValueError: If cell type-specific thresholds do not include all cell types or if using cell type-specific thresholds before cell type assignment.