locan.analysis.ripley.RipleysHFunction#

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

Bases: _Analysis

Compute Ripley’s H 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 (npt.ArrayLike | 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[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 (pd.DataFrame | None) – Data frame with radii as provided and Ripley’s H function.

  • Ripley_h_maximum (pd.DataFrame | None) – Data frame with radius and Ripley’s H value for the radius at which the H function has its maximum.

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

Ripley_h_maximum

count

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

property Ripley_h_maximum: DataFrame | None#
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 H function.

  • other_locdata (Optional[LocData]) – Other localization data from which to estimate Ripley’s H 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