filter_by_label#

IonicConduction.filter_by_label(pores=[], throats=[], labels=None, mode='or')#

Returns which of the supplied pores (or throats) has the specified label(s)

Parameters:
  • pores (array_like) – List of pores or throats to be filtered

  • throats (or) – List of pores or throats to be filtered

  • labels (list of strings) – The labels to apply as a filter

  • mode (str) –

    Controls how the filter is applied. The default value is ‘or’. Options include:

    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 of pores (or throats) that have been filtered according the

  • given criteria. The returned list is a subset of the received list of

  • pores (or throats).

See also

pores, throats