merge_pores#

merge_pores(network, pores, labels=['merged'], include_neighbors=True)[source]#

Combines a selection of pores into a new single pore located at the centroid of the selected pores (and optionally their neighbors) and connected to all of their neighbors.

Parameters:
  • network (Network)

  • pores (array_like) – The list of pores which are to be combined into a new single pore

  • labels (str or list[str]) – The labels to apply to the new pore and new throat connections

Notes

(1) The method also works if a list of lists is passed, in which case it consecutively merges the given selections of pores.

(2) The selection of pores should be chosen carefully, preferrable so that they all form a continuous cluster. For instance, it is recommended to use the find_nearby_pores method to find all pores within a certain distance of a given pore, and these can then be merged without causing any abnormal connections.