locan.analysis.ripley.RipleysKFunction#

class locan.analysis.ripley.RipleysKFunction(meta=None, radii=None, region_measure='bb')[source]#

Bases: _Analysis

Compute Ripley’s K function for two- or three-dimensional data at the given radii.

Parameters:
  • meta (locan.analysis.metadata_analysis_pb2.AMetadata | None) – Metadata about the current analysis routine.

  • radii (Iterable[float] | None) – Radii at which to compute Ripley’s k function.

  • region_measure (float | Literal['bb']) – Region measure (area or volume) for point region. For ‘bb’ the region measure of the bounding_box is used.

Variables:
  • count (int) – A counter for counting instantiations.

  • parameter (dict) – 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 radii as provided and Ripley’s K function.

Methods

__init__([meta, radii, region_measure])

compute(locdata[, other_locdata])

Run the computation.

plot([ax])

rtype:

Axes

report(*args, **kwargs)

Show a report about analysis results.

Attributes

count

A counter for counting Analysis class instantiations (class attribute).

compute(locdata, other_locdata=None)[source]#

Run the computation.

Parameters:
  • locdata (LocData) – Localization data with 2D or 3D coordinates on which to estimate Ripley’s K function.

  • other_locdata (Optional[LocData]) – Other localization data from which to estimate Ripley’s K function (e.g. subset of points). For None other_points is set to points (default).

Return type:

Self

count: int = 0#

A counter for counting Analysis class instantiations (class attribute).

plot(ax=None, **kwargs)[source]#
Return type:

Axes