locan.analysis.accumulation_analysis.AccumulationClusterCheck#
- class locan.analysis.accumulation_analysis.AccumulationClusterCheck(meta=None, region_measure='bb', algorithm=<function cluster_hdbscan>, algo_parameter=None, hull='bb', n_loc=10, divide='random', n_extrapolate=5)[source]#
Bases:
_Analysis
Check for the presence of clusters in localization data by analyzing variations in cluster area and localization density within clusters.
- Parameters:
meta (locan.analysis.metadata_analysis_pb2.AMetadata | None) – Metadata about the current analysis routine.
region_measure (float | Literal["bb", "ch"]) –
- Region measure (area or volume) for the support of locdata. String can
be any of standard hull identifier.
algorithm (Callable[..., tuple[LocData, LocData]]) – Clustering algorithm.
algo_parameter (dict) – Dictionary with kwargs for algorithm.
hull (Literal["bb", "ch"]) – Hull computation that is used to compute cluster region measures (area or volume). The identifier string can be one of the defined hulls.
n_loc (int | Sequence[int]) – If n_loc is an int, it defines the number of localization subsets into which the total number of localizations are distributed. If n_loc is a sequence, it defines the number of localizations used for each localization subset.
divide (Literal["random", "sequential"]) – Identifier to choose how to partition the localization data. For random localizations are selected randomly. For sequential localizations are selected as chuncks of increasing size always starting from the first element.
n_extrapolate (int) – The number of rho values taken to extrapolate rho_zero.
- Variables:
count (int) – A counter for counting instantiations.
parameter (dict[str, Any]) – A dictionary with all settings for the current computation.
meta (locan.analysis.metadata_analysis_pb2.AMetadata) – Metadata about the current analysis routine.
results (pandas.DataFrame) – Data frame with localization density, relative area coverage by the clusters (eta), average density of localizations within apparent clusters (rho), and rho normalized to the extrapolated value of rho for localization_density=0 (rho_zero). If the extrapolation of rho yields a negative value rho_zero is set to 1.
Methods
__init__
([meta, region_measure, algorithm, ...])compute
(locdata)Run the computation.
plot
([ax])Provide plot of results as
matplotlib.axes.Axes
object.report
(*args, **kwargs)Show a report about analysis results.
Attributes
A counter for counting Analysis class instantiations (class attribute).
- compute(locdata)[source]#
Run the computation.
- Parameters:
locdata (
LocData
) – Localization data that might be clustered.- Return type:
Self
-
count:
int
= 0# A counter for counting Analysis class instantiations (class attribute).