heterogeneity_curve#

heterogeneity_curve(image, no_radii=50, n_samples_per_radius=50, min_radius=inf, max_radius=inf, grid=False)[source]#

Compute a curve of the porosity variance over n_samples_per_radius points for no_radii size moving windows. This provides a rough estimate for quantifying the heterogeneity of the pore space.

Return type:

Tuple[ndarray, ndarray]

Parameters:
  • image – A binary image where the pore phase is labeled 1 and the grain phase is labeled 0.

  • no_radii – The number of radii to compute the curve for. Default = 50.

  • n_samples_per_radius – The number of samples to compute porosity variance for each radius. Default = 50.

  • min_radius – The minimum radius to compute the curve for. Defaults: Maximum of Euclidean distance transform.

  • max_radius – The maximum radius to compute the curve for. Default: Maximum of Euclidean distance transform + 100.

  • grid – If True, compute the curve on a regular grid. If False, compute the curve using random locations.

  • False (Default =)

Returns:

The radii and porosity variance at each radius.

Return type:

Tuple[numpy.ndarray, numpy.ndarray]