pytuflow.TPC.ids

Contents

pytuflow.TPC.ids#

TPC.ids(filter_by=None)#

Returns all the available IDs for the output.

The filter_by is an optional input that can be used to filter the return further. Valid filters for the TPC class are:

Domain filters:

  • 1d

  • 2d (or po)

  • rl (or 0d)

Geometry filters:

  • node

  • channel

  • point - (for 2d and rl domains only - use node for 1d domain)

  • line - (for 2d and rl domains only - use channel for 1d domain)

  • polygon (or region)

Data type filters:

  • [data_type]: The data_type to filter the ids by.

Combine filters:

  • [filter1]/[filter2]/...: (use / to delim).

Parameters:

filter_by (str, optional) – The string to filter the IDs by.

Returns:

The available IDs.

Return type:

list[str]

Examples

Get the IDs for all po results:

>>> res = TPC('/path/to/result.tpc')
>>> res.ids('po')
['po_poly', 'po_point', 'po_line']

Get the IDs for all rl line results:

>>> res.ids('rl/line')
['rl_line']