bento.tl.aspect_ratio

bento.tl.aspect_ratio(sdata, shape_key, recompute=False)

Compute the aspect ratio of the minimum rotated rectangle that contains each shape.

Parameters:
  • sdata (SpatialData) – Spatial formatted SpatialData

  • shape_key (str) – Key in sdata.shapes[shape_key] that contains the shape information.

  • Fields

  • ——

    .shapes[shape_key][‘{shape}_aspect_ratio’]float

    Ratio of major to minor axis for each polygon