bento.tl.radius

bento.tl.radius(sdata, shape_key, recompute=False) None

Compute average radius of each shape.

The radius is calculated as the mean distance from the shape’s centroid to points on its boundary.

Parameters:
  • sdata (SpatialData) – Input SpatialData object

  • shape_key (str) – Key in sdata.shapes containing shape geometries

  • recompute (bool, default False) – Whether to force recomputation if feature exists

Returns:

Updates sdata.shapes[shape_key] with: - ‘{shape_key}_radius’: Average radius of each shape

Return type:

None