pores#

Cubic.pores(labels=None, mode='or', asmask=False)#

Returns pore indicies where given labels exist, according to the logic specified by the mode argument.

Parameters:
  • labels (str or list[str]) – The label(s) whose pores locations are requested. This argument also accepts ‘*’ for wildcard searches.

  • mode (str) –

    Specifies how the query should be performed. The options are:

    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.

  • asmask (bool) – If True then a boolean array of length Np is returned with True values indicating the pores that satisfy the query.

Returns:

  • A Numpy array containing pore indices filtered by the logic specified

  • in mode.

See also

throats

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.

To perform more complex or compound queries, you can opt to receive the result a a boolean mask (asmask=True), then manipulate the arrays manually.