labels#

InvasionPercolation.labels(pores=[], throats=[], element=None, mode='union')#

Returns a list of labels present on the object

Additionally, this function can return labels applied to a specified set of pores or throats

Parameters:
  • element (str) – Controls whether pore or throat labels are returned. If empty then both are returned (default).

  • throats) (pores (or) – The pores (or throats) whose labels are sought. If left empty a list containing all pore and throat labels is returned.

  • mode (str, optional) –

    Controls how the query should be performed. Only applicable when pores or throats are specified:

    mode

    meaning

    ’or’

    Returns the labels that are assigned to any of the given locations. Also accepts ‘union’ and ‘any’

    ’and’

    Labels that are present on all the given locations. also accepts ‘intersection’ and ‘all’

    ’xor’

    Labels that are present on only one of the given locations.Also accepts ‘exclusive_or’

    ’nor’

    Labels that are not present on any of the given locations. Also accepts ‘not’ and ‘none’

    ’nand’

    Labels that are present on all but one of the given locations

    ’xnor’

    Labels that are present on more than one of the given locations.

Returns:

  • A list containing the labels on the object. If pores or

  • throats are given, the results are filtered according to the

  • specified mode.

See also

props, keys

Notes

Technically, ‘nand’ and ‘xnor’ should also return pores with none of the labels but these are not included. This makes the returned list more useful.