mfjet.calculator_mf_manhattan module#

class mfjet.calculator_mf_manhattan.MFManhattanCalculator#

Bases: object

Minkowski functional calculator for the persistent analysis with Steiner-type formula in Manhattan geometry.

calc_mfs(coords, r)#

Compute MFs given points dilated by a square with half-width r.

Parameters:
  • coords (array_like with shape (N_pt, 2))

  • r (float or array_like) – Specifies the half-width of a square in the Minkowski sum.

Returns:

array of Minkowski functionals given r. The last index k is labeling $k$-th Minkiwski functionals

k=0: Euler characteristic k=1: Boundary length k=2: Area

Return type:

np.array with shape (3,) or (r.shape, 3)

dilate_points_by_square(coords, r)#

Dilate given points by a square with half-width r. This dilation function is for Steiner-type formula for Euclidean distance.

Parameters:
  • coords (array_like with shape (N_pt, 2))

  • r (float) – Specifies the half-width of a square in the Minkowski sum.

Returns:

geometry object representing dilated points

Return type:

shapely.Polygon or shapely.MultiPolygon